Skip to content

Commit

Permalink
update test script to read and write with gzip compression
Browse files Browse the repository at this point in the history
  • Loading branch information
corylanou authored and toddboom committed Apr 6, 2015
1 parent 231f051 commit 63ded4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/query_with_gzip.sh

This file was deleted.

11 changes: 11 additions & 0 deletions tests/read_write_gzip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
echo "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 3 DEFAULT"

echo "inserting data"
curl -v -i --compressed -H "Content-encoding: gzip" -d '{"database" : "foo", "retentionPolicy" : "bar", "points": [{"name": "cpu", "tags": {"host": "server01"},"timestamp": "2015-01-26T22:01:11.703Z","fields": {"value": 100}}]}' -H "Content-Type: application/json" http://localhost:8086/write

echo "querying data with gzip encoding"
curl -v -G --compressed http://localhost:8086/query --data-urlencode "db=foo" --data-urlencode "q=SELECT sum(value) FROM \"foo\".\"bar\".cpu GROUP BY time(1h)"

0 comments on commit 63ded4f

Please sign in to comment.