Add query parser test for non-null fill

pull/1885/head
Jared Scheib 2017-09-05 18:10:08 -04:00
parent c785698660
commit 1eeae173bc
1 changed files with 27 additions and 0 deletions

View File

@ -417,6 +417,33 @@ func TestConvert(t *testing.T) {
},
},
},
{
name: "Test fill non-null word accepted",
influxQL: `SELECT mean("usage_idle") FROM "telegraf"."autogen"."cpu" WHERE time > now() - 15m GROUP BY time(1m) FILL(linear)`,
want: chronograf.QueryConfig{
Database: "telegraf",
Measurement: "cpu",
RetentionPolicy: "autogen",
Fields: []chronograf.Field{
chronograf.Field{
Field: "usage_idle",
Funcs: []string{
"mean",
},
},
},
GroupBy: chronograf.GroupBy{
Time: "1m",
Tags: []string{},
},
Tags: map[string][]string{},
AreTagsAccepted: false,
Fill: "linear",
Range: &chronograf.DurationRange{
Lower: "now() - 15m",
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {