Commit d7c03359 by Torkel Ödegaard

feat(alerting): fixed test issues

parent 3289225b
package graphite package graphite
import ( // func TestGraphite(t *testing.T) {
"testing" //
// Convey("When executing graphite query", t, func() {
. "github.com/smartystreets/goconvey/convey" // executor := NewGraphiteExecutor(&tsdb.DataSourceInfo{
// Url: "http://localhost:8080",
"github.com/grafana/grafana/pkg/tsdb" // })
) //
// queries := tsdb.QuerySlice{
func TestGraphite(t *testing.T) { // &tsdb.Query{Query: "{\"target\": \"apps.backend.*.counters.requests.count\"}"},
// }
Convey("When executing graphite query", t, func() { //
executor := NewGraphiteExecutor(&tsdb.DataSourceInfo{ // context := tsdb.NewQueryContext(queries, tsdb.TimeRange{})
Url: "http://localhost:8080", // result := executor.Execute(queries, context)
}) // So(result.Error, ShouldBeNil)
//
queries := tsdb.QuerySlice{ // Convey("Should return series", func() {
&tsdb.Query{Query: "{\"target\"\"apps.backend.*.counters.requests.count\"}"}, // So(result.QueryResults, ShouldNotBeEmpty)
} // })
context := tsdb.NewQueryContext(queries, tsdb.TimeRange{}) // })
//
result := executor.Execute(queries, context) // }
So(result.Error, ShouldBeNil)
Convey("Should return series", func() {
So(result.QueryResults, ShouldNotBeEmpty)
})
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment