diff options
author | Marijan <marijan.petricevic@hotmail.de> | 2019-11-06 14:23:44 +0100 |
---|---|---|
committer | Marijan Petricevic <marijan.petricevic94@gmail.com> | 2019-11-07 10:51:04 +0100 |
commit | 349c14f9502d50f011b20329ab10865844d363ee (patch) | |
tree | 3adecc4488124ac2494b6847b9f22b298664b1f7 /nixos/tests | |
parent | 2f7199af213465a806450013d82cf2be42de4075 (diff) | |
download | nixlib-349c14f9502d50f011b20329ab10865844d363ee.tar nixlib-349c14f9502d50f011b20329ab10865844d363ee.tar.gz nixlib-349c14f9502d50f011b20329ab10865844d363ee.tar.bz2 nixlib-349c14f9502d50f011b20329ab10865844d363ee.tar.lz nixlib-349c14f9502d50f011b20329ab10865844d363ee.tar.xz nixlib-349c14f9502d50f011b20329ab10865844d363ee.tar.zst nixlib-349c14f9502d50f011b20329ab10865844d363ee.zip |
nixos/cadvisor: port test to python
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/cadvisor.nix | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/nixos/tests/cadvisor.nix b/nixos/tests/cadvisor.nix index e60bae4b7003..60c04f147800 100644 --- a/nixos/tests/cadvisor.nix +++ b/nixos/tests/cadvisor.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... } : { +import ./make-test-python.nix ({ pkgs, ... } : { name = "cadvisor"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ offline ]; @@ -16,20 +16,19 @@ import ./make-test.nix ({ pkgs, ... } : { }; }; - testScript = - '' - startAll; - $machine->waitForUnit("cadvisor.service"); - $machine->succeed("curl http://localhost:8080/containers/"); + testScript = '' + start_all() + machine.wait_for_unit("cadvisor.service") + machine.succeed("curl http://localhost:8080/containers/") - $influxdb->waitForUnit("influxdb.service"); + influxdb.wait_for_unit("influxdb.service") # create influxdb database - $influxdb->succeed(q~ - curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root" - ~); + influxdb.succeed( + 'curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"' + ) - $influxdb->waitForUnit("cadvisor.service"); - $influxdb->succeed("curl http://localhost:8080/containers/"); + influxdb.wait_for_unit("cadvisor.service") + influxdb.succeed("curl http://localhost:8080/containers/") ''; }) |