fix(influxdb): broken unittests

This commit is contained in:
bergquist 2016-10-12 07:43:30 +02:00
parent 1b8a81d4ba
commit 5a91d45f3f
2 changed files with 2 additions and 5 deletions

View File

@ -12,10 +12,7 @@ func (qp *InfluxdbQueryParser) Parse(model *simplejson.Json) (*Query, error) {
policy := model.Get("policy").MustString("default") policy := model.Get("policy").MustString("default")
rawQuery := model.Get("query").MustString("") rawQuery := model.Get("query").MustString("")
measurement, err := model.Get("measurement").String() measurement := model.Get("measurement").MustString("")
if err != nil {
return nil, err
}
resultFormat, err := model.Get("resultFormat").String() resultFormat, err := model.Get("resultFormat").String()
if err != nil { if err != nil {

View File

@ -164,7 +164,7 @@ func TestInfluxdbQueryParser(t *testing.T) {
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(res.RawQuery, ShouldEqual, "RawDummieQuery") So(res.RawQuery, ShouldEqual, "RawDummieQuery")
So(len(res.GroupBy), ShouldEqual, 2) So(len(res.GroupBy), ShouldEqual, 2)
So(len(res.Selects), ShouldEqual, 2) So(len(res.Selects), ShouldEqual, 1)
So(len(res.Tags), ShouldEqual, 0) So(len(res.Tags), ShouldEqual, 0)
}) })
}) })