nixos/tests/cadvisor: Use curl --fail

This commit is contained in:
Scott Worley 2020-09-16 09:02:28 -07:00 committed by Frederik Rietdijk
parent eff7338d98
commit ecbd2a8bc1

View File

@ -19,16 +19,16 @@ import ./make-test-python.nix ({ pkgs, ... } : {
testScript = ''
start_all()
machine.wait_for_unit("cadvisor.service")
machine.succeed("curl http://localhost:8080/containers/")
machine.succeed("curl -f http://localhost:8080/containers/")
influxdb.wait_for_unit("influxdb.service")
# create influxdb database
influxdb.succeed(
'curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
'curl -f -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
)
influxdb.wait_for_unit("cadvisor.service")
influxdb.succeed("curl http://localhost:8080/containers/")
influxdb.succeed("curl -f http://localhost:8080/containers/")
'';
})