1
0
Fork 0

wait for open port in all tests to reduce flakiness

This commit is contained in:
ibizaman 2023-12-03 23:33:39 -08:00 committed by Pierre Penninckx
parent 66398fe159
commit 5f4ea7acfb
3 changed files with 6 additions and 0 deletions

View file

@ -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(

View file

@ -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)

View file

@ -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)