Skip to content

Commit 5a91d45

Browse files
committed
fix(influxdb): broken unittests
1 parent 1b8a81d commit 5a91d45

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pkg/tsdb/influxdb/model_parser.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ func (qp *InfluxdbQueryParser) Parse(model *simplejson.Json) (*Query, error) {
1212
policy := model.Get("policy").MustString("default")
1313
rawQuery := model.Get("query").MustString("")
1414

15-
measurement, err := model.Get("measurement").String()
16-
if err != nil {
17-
return nil, err
18-
}
15+
measurement := model.Get("measurement").MustString("")
1916

2017
resultFormat, err := model.Get("resultFormat").String()
2118
if err != nil {

pkg/tsdb/influxdb/model_parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func TestInfluxdbQueryParser(t *testing.T) {
164164
So(err, ShouldBeNil)
165165
So(res.RawQuery, ShouldEqual, "RawDummieQuery")
166166
So(len(res.GroupBy), ShouldEqual, 2)
167-
So(len(res.Selects), ShouldEqual, 2)
167+
So(len(res.Selects), ShouldEqual, 1)
168168
So(len(res.Tags), ShouldEqual, 0)
169169
})
170170
})

0 commit comments

Comments
 (0)