diff --git a/test/vm/ldap.nix b/test/vm/ldap.nix index 6b8ee60..967757a 100644 --- a/test/vm/ldap.nix +++ b/test/vm/ldap.nix @@ -34,6 +34,7 @@ start_all() server.wait_for_unit("lldap.service") + server.wait_for_open_port(${toString nodes.server.services.lldap.settings.http_port}) with subtest("fail without authenticating"): client.fail( diff --git a/test/vm/monitoring.nix b/test/vm/monitoring.nix index 12723ce..e9ee204 100644 --- a/test/vm/monitoring.nix +++ b/test/vm/monitoring.nix @@ -28,6 +28,7 @@ testScript = { nodes, ... }: '' start_all() machine.wait_for_unit("grafana.service") + machine.wait_for_open_port(${toString nodes.machine.services.grafana.settings.server.http_port}) def curl_req(password, wantStatus, endpoint): response = machine.wait_until_succeeds("curl -i http://admin:{password}@localhost:3000{endpoint}".format(password=password, endpoint=endpoint), timeout=10) diff --git a/test/vm/postgresql.nix b/test/vm/postgresql.nix index c8ef789..61872c3 100644 --- a/test/vm/postgresql.nix +++ b/test/vm/postgresql.nix @@ -19,6 +19,7 @@ testScript = { nodes, ... }: '' start_all() machine.wait_for_unit("postgresql.service") + machine.wait_for_open_port(5432) def peer_cmd(user, database): return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database) @@ -60,6 +61,7 @@ testScript = { nodes, ... }: '' start_all() machine.wait_for_unit("postgresql.service") + machine.wait_for_open_port(5432) def peer_cmd(user, database): return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database) @@ -101,6 +103,7 @@ testScript = { nodes, ... }: '' start_all() machine.wait_for_unit("postgresql.service") + machine.wait_for_open_port(5432) def peer_cmd(user, database): return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database) @@ -147,6 +150,7 @@ testScript = { nodes, ... }: '' start_all() machine.wait_for_unit("postgresql.service") + machine.wait_for_open_port(5432) def peer_cmd(user, database): return "sudo -u me psql -U {user} {db} --command \"\"".format(user=user, db=database)