From f270150f31c5d7fbc7ca67d8282d29d025588a79 Mon Sep 17 00:00:00 2001 From: phala Date: Mon, 27 May 2024 10:41:27 +0200 Subject: [PATCH] Add retry codes to additional asserts --- .../kuadrant/authorino/multiple_hosts/test_remove_host.py | 5 +++-- .../tests/kuadrant/reconciliation/test_httproute_matches.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py b/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py index 5ce00ec5..b219b5da 100644 --- a/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py +++ b/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py @@ -18,5 +18,6 @@ def test_removing_host(client, client2, auth, route, second_hostname): response = client.get("/get", auth=auth) assert response.status_code == 200 - response = client2.get("/get", auth=auth) - assert response.status_code == 404 + with second_hostname.client(retry_codes={200}) as failing_client: + response = failing_client.get("/get", auth=auth) + assert response.status_code == 404 diff --git a/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py b/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py index c0e9d1bd..eeb7359a 100644 --- a/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py +++ b/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py @@ -25,5 +25,6 @@ def test_matches(client, backend, route, hostname): response = failing_client.get("/get") assert response.status_code == 404, "Matches were not reconciled" - response = client.get("/anything/get") - assert response.status_code == 200 + with hostname.client(retry_codes={404, 503}) as new_client: + response = new_client.get("/anything/get") + assert response.status_code == 200