add integration tests

pull/2606/head
Cory LaNou 2015-05-19 10:34:34 -06:00
parent ca11be338f
commit 57b667db88
1 changed files with 12 additions and 0 deletions

View File

@ -677,6 +677,18 @@ func runTestsData(t *testing.T, testName string, nodes Cluster, database, retent
queryDb: "%DB%", queryDb: "%DB%",
expected: `{"results":[{"series":[{"name":"cpu","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",[20,30,100]]]}]}]}`, expected: `{"results":[{"series":[{"name":"cpu","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",[20,30,100]]]}]}]}`,
}, },
{
name: "distincts alt syntax",
query: `SELECT distinct value FROM cpu`,
queryDb: "%DB%",
expected: `{"results":[{"series":[{"name":"cpu","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",[20,30,100]]]}]}]}`,
},
{
name: "count distinct",
query: `SELECT count(distinct value) FROM cpu`,
queryDb: "%DB%",
expected: `{"results":[{"series":[{"name":"cpu","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",3]]}]}]}`,
},
{ {
reset: true, reset: true,
name: "aggregations", name: "aggregations",