add test for stddev on 1 point

pull/2354/head
ben hockey 2015-04-29 15:40:07 -05:00
parent 762a77079a
commit ee01a5f66f
1 changed files with 10 additions and 0 deletions

View File

@ -579,6 +579,16 @@ func runTestsData(t *testing.T, testName string, nodes Cluster, database, retent
},
// Aggregations
{
reset: true,
name: "stddev with just one point",
write: `{"database" : "%DB%", "retentionPolicy" : "%RP%", "points": [
{"name": "cpu", "timestamp": "2015-04-20T14:27:41Z", "fields": {"value": 45}}
]}`,
query: `SELECT stddev(value) FROM cpu`,
queryDb: "%DB%",
expected: `{"results":[{"series":[{"name":"cpu","columns":["time","stddev"],"values":[["1970-01-01T00:00:00Z",null]]}]}]}`,
},
{
reset: true,
name: "large mean and stddev",