diff options
author | Christian Kampka <christian@kampka.net> | 2019-12-15 17:01:03 +0100 |
---|---|---|
committer | Christian Kampka <christian@kampka.net> | 2019-12-16 12:52:33 +0100 |
commit | 9fbb427f6799d5fe180f5fbd07f6d93da55508c4 (patch) | |
tree | e265ff1a18934e441bd07c226c6e6275e595208b | |
parent | 0de0b6a281501c55fff1d20b567bfa4fbf65e408 (diff) | |
download | nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.tar nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.tar.gz nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.tar.bz2 nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.tar.lz nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.tar.xz nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.tar.zst nixpkgs-9fbb427f6799d5fe180f5fbd07f6d93da55508c4.zip |
nixosTests.haproxy: Port tests to python
-rw-r--r-- | nixos/tests/haproxy.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/nixos/tests/haproxy.nix b/nixos/tests/haproxy.nix index 72e77a68193..b6fed3e2108 100644 --- a/nixos/tests/haproxy.nix +++ b/nixos/tests/haproxy.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...}: { +import ./make-test-python.nix ({ pkgs, ...}: { name = "haproxy"; nodes = { machine = { ... }: { @@ -33,11 +33,13 @@ import ./make-test.nix ({ pkgs, ...}: { }; }; testScript = '' - startAll; - $machine->waitForUnit('multi-user.target'); - $machine->waitForUnit('haproxy.service'); - $machine->waitForUnit('httpd.service'); - $machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"'); - $machine->succeed('curl -k http://localhost:80/metrics | grep haproxy_process_pool_allocated_bytes'); + start_all() + machine.wait_for_unit("multi-user.target") + machine.wait_for_unit("haproxy.service") + machine.wait_for_unit("httpd.service") + assert "We are all good!" in machine.succeed("curl -k http://localhost:80/index.txt") + assert "haproxy_process_pool_allocated_bytes" in machine.succeed( + "curl -k http://localhost:80/metrics" + ) ''; }) |