Unit test EQ and NEQ tag query

pull/2105/head
Philip O'Toole 2015-03-31 11:56:00 -07:00 committed by Philip O'Toole
parent 26b2a2662c
commit 60149cf7b5
1 changed files with 5 additions and 0 deletions

View File

@ -603,6 +603,11 @@ func runTestsData(t *testing.T, testName string, nodes Cluster, database, retent
query: `SELECT value FROM "%DB%"."%RP%".cpu WHERE host = 'server01' AND region = 'us-west'`,
expected: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",100]]}]}]}`,
},
{
name: "WHERE tags SELECT single field (1 EQ and 1 NEQ tag)",
query: `SELECT value FROM "%DB%"."%RP%".cpu WHERE host = 'server01' AND region != 'us-west'`,
expected: `{"results":[{}]}`,
},
{
name: "WHERE tags SELECT single field (EQ tag value2)",
query: `SELECT value FROM "%DB%"."%RP%".cpu WHERE host = 'server02'`,