diff options
author | Eric Sagnes <eric.sagnes@gmail.com> | 2016-09-08 21:18:21 +0900 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-09-08 15:01:10 +0200 |
commit | f39f829441710a754842590fd49b67a85e0d4eab (patch) | |
tree | bdfb4f57a8a16107f69dff5b252e513094f3b6bb /nixos/tests/influxdb.nix | |
parent | b082f75f4dee4099f7b1bd8f9ec925863cde1446 (diff) |
nixos: unbreak influxdb test (due to new API)
Data from the documentation example[1] was used.
[1] https://docs.influxdata.com/influxdb/v1.0/guides/writing_data/
[Bjørn: change commit message.]
Diffstat (limited to 'nixos/tests/influxdb.nix')
-rw-r--r-- | nixos/tests/influxdb.nix | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/nixos/tests/influxdb.nix b/nixos/tests/influxdb.nix index 0408d8983ade..aca2189716a4 100644 --- a/nixos/tests/influxdb.nix +++ b/nixos/tests/influxdb.nix @@ -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" ~); ''; }) |