Skip to content

Commit

Permalink
nixos: unbreak influxdb test (due to new API)
Browse files Browse the repository at this point in the history
Data from the documentation example[1] was used.

[1] https://docs.influxdata.com/influxdb/v1.0/guides/writing_data/

[Bjørn: change commit message.]

(cherry picked from commit f39f829)
  • Loading branch information
ericsagnes authored and bjornfor committed Sep 8, 2016
1 parent 541bd5c commit e3bdf6b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions nixos/tests/influxdb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@ import ./make-test.nix ({ pkgs, ...} : {
# create database
$one->succeed(q~
curl -X POST 'http://localhost:8086/db?u=root&p=root' \
-d '{"name": "test"}'
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE test"
~);
# write some points and run simple query
$one->succeed(q~
curl -X POST 'http://localhost:8086/db/test/series?u=root&p=root' \
-d '[{"name":"foo","columns":["val"],"points":[[6666]]}]'
curl -XPOST 'http://localhost:8086/write?db=test' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
~);
$one->succeed(q~
curl -G 'http://localhost:8086/db/test/series?u=root&p=root' \
--data-urlencode 'q=select * from foo limit 1' | grep 6666
curl -GET 'http://localhost:8086/query' --data-urlencode "db=test" --data-urlencode "q=SELECT \"value\" FROM \"cpu_load_short\" WHERE \"region\"='us-west'" | grep "0\.64"
~);
'';
})

0 comments on commit e3bdf6b

Please sign in to comment.