summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-09-08 21:18:21 +0900
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-09-08 15:01:10 +0200
commitf39f829441710a754842590fd49b67a85e0d4eab (patch)
treebdfb4f57a8a16107f69dff5b252e513094f3b6bb
parentb082f75f4dee4099f7b1bd8f9ec925863cde1446 (diff)
downloadnixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.tar
nixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.tar.gz
nixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.tar.bz2
nixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.tar.lz
nixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.tar.xz
nixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.tar.zst
nixpkgs-f39f829441710a754842590fd49b67a85e0d4eab.zip
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.]
-rw-r--r--nixos/tests/influxdb.nix9
1 files changed, 3 insertions, 6 deletions
diff --git a/nixos/tests/influxdb.nix b/nixos/tests/influxdb.nix
index 0408d8983ad..aca2189716a 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"
     ~);
   '';
 })