Skip to content

Commit 9a1e120

Browse files
committed
Updating onfailed test to align with removal of openresty headers from APIcast midstream
1 parent 3ba16bd commit 9a1e120

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

testsuite/tests/apicast/policy/on_failed/test_onfailed.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def failing_chain(on_failed_policy) -> tuple:
2020
"""returns a policy chain that fails the execution
2121
made by a non-existent policy and on_failed policy"""
22-
return (rawobj.PolicyConfig("invalid_policy", {}), on_failed_policy)
22+
return (on_failed_policy, rawobj.PolicyConfig("invalid_policy", {}))
2323

2424

2525
@pytest.fixture
@@ -54,7 +54,7 @@ def status_code(chain_name, on_failed_configuration) -> int:
5454

5555
@backoff.on_predicate(
5656
backoff.fibo,
57-
lambda response: response.headers.get("server") not in ("openresty", "envoy"),
57+
lambda response: response.status_code not in (200, 503, 500),
5858
max_tries=8,
5959
jitter=None,
6060
)
@@ -72,4 +72,3 @@ def test_on_failed_policy(application, status_code):
7272

7373
response = make_request(api_client)
7474
assert response.status_code == status_code
75-
assert response.headers["server"] in ("openresty", "envoy")

0 commit comments

Comments
 (0)