fix(influxdb): add support for regex measurments

closes #6560
This commit is contained in:
bergquist
2016-11-14 08:47:45 +01:00
parent a87fd11f26
commit 4fdfee739a
2 changed files with 22 additions and 2 deletions

View File

@@ -120,5 +120,17 @@ func TestInfluxdbQueryBuilder(t *testing.T) {
So(strings.Join(query.renderTags(), ""), ShouldEqual, `"key" = 'value'`)
})
Convey("can render regular measurement", func() {
query := &Query{Measurement: `apa`, Policy: "policy"}
So(query.renderMeasurement(), ShouldEqual, ` FROM "policy"."apa"`)
})
Convey("can render regexp measurement", func() {
query := &Query{Measurement: `/apa/`, Policy: "policy"}
So(query.renderMeasurement(), ShouldEqual, ` FROM "policy"./apa/`)
})
})
}