diff options
author | Scott Worley <scottworley@scottworley.com> | 2020-09-16 08:21:54 -0700 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-10-25 11:01:30 +0100 |
commit | 1959ab707ca7ac41bf99ad3feefc17ab56cc425a (patch) | |
tree | 97ad5fe7f093a63e078cd19250469c5268af9137 /nixos/tests | |
parent | c69d4eda3d1b3badc2c928fc4201f1dc60062db4 (diff) |
nixos/tests/victoriametrics: Use curl --fail
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/victoriametrics.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/tests/victoriametrics.nix b/nixos/tests/victoriametrics.nix index 73ef8b7286153..fff8d7005da17 100644 --- a/nixos/tests/victoriametrics.nix +++ b/nixos/tests/victoriametrics.nix @@ -19,9 +19,11 @@ import ./make-test-python.nix ({ pkgs, ...} : { # write some points and run simple query out = one.succeed( - "curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/write'" + "curl -f -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/write'" + ) + cmd = ( + """curl -f -s -G 'http://localhost:8428/api/v1/export' -d 'match={__name__!=""}'""" ) - cmd = """curl -s -G 'http://localhost:8428/api/v1/export' -d 'match={__name__!=""}'""" # data takes a while to appear one.wait_until_succeeds(f"[[ $({cmd} | wc -l) -ne 0 ]]") out = one.succeed(cmd) |