summary refs log tree commit diff
path: root/nixos/tests/haproxy.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-12-19 09:19:50 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-12-19 09:19:50 +0100
commitf79e10061f4e7a8988831e9734e131492e5b311f (patch)
tree8ae45d9a41e802f5339f46cd0d05b5f7cb31ffad /nixos/tests/haproxy.nix
parentbf2877b9ab69caa83daf4191b13d903bc82ab337 (diff)
parent7315dc071c901b83dfcacb5536f32699b2cb610a (diff)
downloadnixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.tar
nixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.tar.gz
nixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.tar.bz2
nixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.tar.lz
nixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.tar.xz
nixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.tar.zst
nixpkgs-f79e10061f4e7a8988831e9734e131492e5b311f.zip
Merge master into staging-next
Diffstat (limited to 'nixos/tests/haproxy.nix')
-rw-r--r--nixos/tests/haproxy.nix16
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"
+    )
   '';
 })