Commit ddee919e by Daniel Lee

stackdriver: remove WIP tests

parent 8211f7d0
...@@ -255,23 +255,23 @@ func TestStackdriver(t *testing.T) { ...@@ -255,23 +255,23 @@ func TestStackdriver(t *testing.T) {
}) })
}) })
Convey("when data from query with no aggregation and alias by", func() { // Convey("when data from query with no aggregation and alias by", func() {
data, err := loadTestFile("./test-data/2-series-response-no-agg.json") // data, err := loadTestFile("./test-data/2-series-response-no-agg.json")
So(err, ShouldBeNil) // So(err, ShouldBeNil)
So(len(data.TimeSeries), ShouldEqual, 3) // So(len(data.TimeSeries), ShouldEqual, 3)
res := &tsdb.QueryResult{Meta: simplejson.New(), RefId: "A"} // res := &tsdb.QueryResult{Meta: simplejson.New(), RefId: "A"}
query := &StackdriverQuery{AliasBy: "{{metric.label.instance_name}}", GroupBys: []string{"metric.label.instance_name", "resource.label.zone"}} // query := &StackdriverQuery{AliasBy: "{{metric.label.instance_name}}", GroupBys: []string{"metric.label.instance_name", "resource.label.zone"}}
err = executor.parseResponse(res, data, query) // err = executor.parseResponse(res, data, query)
So(err, ShouldBeNil) // So(err, ShouldBeNil)
Convey("Should use alias by formatting and only show instance name", func() { // Convey("Should use alias by formatting and only show instance name", func() {
So(len(res.Series), ShouldEqual, 3) // So(len(res.Series), ShouldEqual, 3)
So(res.Series[0].Name, ShouldEqual, "collector-asia-east-1") // So(res.Series[0].Name, ShouldEqual, "collector-asia-east-1")
So(res.Series[1].Name, ShouldEqual, "collector-europe-west-1") // So(res.Series[1].Name, ShouldEqual, "collector-europe-west-1")
So(res.Series[2].Name, ShouldEqual, "collector-us-east-1") // So(res.Series[2].Name, ShouldEqual, "collector-us-east-1")
}) // })
}) // })
}) })
}) })
} }
......
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