Skip to content

Commit bece37b

Browse files
committed
fix: add some waiter for first route as the gateway may not be available
1 parent 21179c5 commit bece37b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/integrations/gateway/test_gateway.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
def test_integration_gateway(cli_runner: CliRunner):
1010
messages = routed_functions.MESSAGES
1111

12-
gateway_url = f"https://{utils.get_gateway_endpoint()}"
12+
gateway_domain = utils.get_gateway_endpoint()
13+
gateway_url = "https://" + gateway_domain
1314

1415
res = utils.run_deploy_command(
1516
cli_runner,
@@ -19,8 +20,9 @@ def test_integration_gateway(cli_runner: CliRunner):
1920
assert res.exit_code == 0, res.output
2021

2122
# Check general routing configuration
22-
resp = requests.get(
23-
url=gateway_url + "/health", timeout=constants.COLD_START_TIMEOUT
23+
# Wait as the gateway is not immediately available
24+
resp = utils.wait_for_body_text(
25+
domain_name=gateway_domain, body=messages["/health"]
2426
)
2527
assert resp.status_code == 200
2628
assert resp.text == messages["/health"]

0 commit comments

Comments
 (0)