1 # This test runs influxdb and checks if influxdb is up and running
3 import ./make-test-python.nix ({ pkgs, ...} : {
4 name = "victoriametrics";
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ yorickvp ];
11 services.victoriametrics.enable = true;
18 one.wait_for_unit("victoriametrics.service")
20 # write some points and run simple query
22 "curl -f -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/write'"
25 """curl -f -s -G 'http://localhost:8428/api/v1/export' -d 'match={__name__!=""}'"""
27 # data takes a while to appear
28 one.wait_until_succeeds(f"[[ $({cmd} | wc -l) -ne 0 ]]")
29 out = one.succeed(cmd)
30 assert '"values":[123]' in out
31 assert '"values":[1.23]' in out