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.]
This commit is contained in:
parent
b082f75f4d
commit
f39f829441
|
@ -22,18 +22,15 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
# create database
|
# create database
|
||||||
$one->succeed(q~
|
$one->succeed(q~
|
||||||
curl -X POST 'http://localhost:8086/db?u=root&p=root' \
|
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE test"
|
||||||
-d '{"name": "test"}'
|
|
||||||
~);
|
~);
|
||||||
|
|
||||||
# write some points and run simple query
|
# write some points and run simple query
|
||||||
$one->succeed(q~
|
$one->succeed(q~
|
||||||
curl -X POST 'http://localhost:8086/db/test/series?u=root&p=root' \
|
curl -XPOST 'http://localhost:8086/write?db=test' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
|
||||||
-d '[{"name":"foo","columns":["val"],"points":[[6666]]}]'
|
|
||||||
~);
|
~);
|
||||||
$one->succeed(q~
|
$one->succeed(q~
|
||||||
curl -G 'http://localhost:8086/db/test/series?u=root&p=root' \
|
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"
|
||||||
--data-urlencode 'q=select * from foo limit 1' | grep 6666
|
|
||||||
~);
|
~);
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue