File tree Expand file tree Collapse file tree
testsuite/tests/apicast/policy/on_failed Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919def 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" )
You can’t perform that action at this time.
0 commit comments