Add query parser test for non-null fill
parent
c785698660
commit
1eeae173bc
influx
|
@ -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 {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue