diff --git a/influx/query_test.go b/influx/query_test.go index 247b4ea1a..a890ce9bc 100644 --- a/influx/query_test.go +++ b/influx/query_test.go @@ -150,6 +150,26 @@ func TestConvert(t *testing.T) { }, }, }, + { + name: "Test with no where clauses", + influxQL: `SELECT usage_user from telegraf.autogen.cpu`, + want: chronograf.QueryConfig{ + Database: "telegraf", + Measurement: "cpu", + RetentionPolicy: "autogen", + Fields: []chronograf.Field{ + chronograf.Field{ + Field: "usage_user", + Funcs: []string{}, + }, + }, + Tags: map[string][]string{}, + GroupBy: chronograf.GroupBy{ + Time: "", + Tags: []string{}, + }, + }, + }, { name: "Test tags accepted", influxQL: `SELECT usage_user from telegraf.autogen.cpu where "host" = 'myhost' and time > now() - 15m`,