Skip to content

Commit

Permalink
Test explicitly SELECTing time as a field
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Aug 21, 2015
1 parent f026ef8 commit a519a62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/influxd/run/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,11 @@ func TestServer_Query_Common(t *testing.T) {
command: `SELECT value FROM db0.rp0.cpu`,
exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)),
},
&Query{
name: "explicitly selecting time and a valid measurement and field should succeed",
command: `SELECT time,value FROM db0.rp0.cpu`,
exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)),
},
&Query{
name: "selecting a measurement that doesn't exist should result in empty set",
command: `SELECT value FROM db0.rp0.idontexist`,
Expand Down

0 comments on commit a519a62

Please sign in to comment.