mirror of https://github.com/grafana/grafana
Alerting: Add QueryError to expr package (#41737)
parent
15d6da8e8c
commit
543b1a7e39
@ -0,0 +1,16 @@ |
||||
package expr |
||||
|
||||
import ( |
||||
"errors" |
||||
"testing" |
||||
|
||||
"github.com/stretchr/testify/assert" |
||||
) |
||||
|
||||
func TestQueryError(t *testing.T) { |
||||
e := QueryError{ |
||||
RefID: "A", |
||||
Err: errors.New("this is an error message"), |
||||
} |
||||
assert.EqualError(t, e, "failed to execute query A: this is an error message") |
||||
} |
Loading…
Reference in new issue