@@ -1,4 +1,4 @@
1−import ./make-test.nix ({ pkgs, ...}: {
1+import ./make-test-python.nix ({ pkgs, ...}: {
22 name = "haproxy";
33 nodes = {
44 machine = { ... }: {
@@ -33,11 +33,13 @@ import ./make-test.nix ({ pkgs, ...}: {
3333 };
3434 };
3535 testScript = ''
36− startAll;
37− $machine->waitForUnit('multi-user.target');
38− $machine->waitForUnit('haproxy.service');
39− $machine->waitForUnit('httpd.service');
40− $machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"');
41− $machine->succeed('curl -k http://localhost:80/metrics | grep haproxy_process_pool_allocated_bytes');
36+ start_all()
37+ machine.wait_for_unit("multi-user.target")
38+ machine.wait_for_unit("haproxy.service")
39+ machine.wait_for_unit("httpd.service")
40+ assert "We are all good!" in machine.succeed("curl -k http://localhost:80/index.txt")
41+ assert "haproxy_process_pool_allocated_bytes" in machine.succeed(
42+ "curl -k http://localhost:80/metrics"
43+ )
4244 '';
4345})