Merge pull request #1348 from influxdb/tests

End to end test scripts
pull/1350/head
Cory LaNou 2015-01-22 14:22:56 -07:00
commit 201d357c2c
2 changed files with 15 additions and 0 deletions

4
tests/README.md Normal file
View File

@ -0,0 +1,4 @@
Tests
======
This is just the start of a set of test scripts. Consider everything here highly experimental.

11
tests/create_write_query Normal file
View File

@ -0,0 +1,11 @@
o "creating database"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE foo"
echo "creating retention policy"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY bar ON foo DURATION 1h REPLICATION 1 DEFAULT"
echo "inserting data"
curl -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "tags": {"host": "server01"},"timestamp": "2009-11-10T23:00:00Z","values": {"value": 100}}]}' -H "Content-Type: application/json" http://localhost:8086/write
echo "querying data"
curl -G http://localhost:8086/query --data-urlencode "db=foo&q=SELECT COUNT(value) FROM cpu WHERE time > now() - 1h"