mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Add QueryError to expr package (#41737)
This commit is contained in:
16
pkg/expr/nodes_test.go
Normal file
16
pkg/expr/nodes_test.go
Normal file
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user