From 17cf80e76d0f0434476251a16bb55450f03d54c2 Mon Sep 17 00:00:00 2001 From: Jim Ryan Date: Mon, 1 Jul 2024 17:36:17 +0100 Subject: [PATCH] fix tests --- tests/suite/test_v_s_route_upstream_options.py | 12 +++++------- tests/suite/test_virtual_server_grpc.py | 5 ++++- tests/suite/test_virtual_server_upstream_options.py | 9 ++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/suite/test_v_s_route_upstream_options.py b/tests/suite/test_v_s_route_upstream_options.py index 88bf20b200..74c6e7e187 100644 --- a/tests/suite/test_v_s_route_upstream_options.py +++ b/tests/suite/test_v_s_route_upstream_options.py @@ -576,8 +576,7 @@ class TestOptionsSpecificForPlus: }, }, [ - "health_check uri=/ port=8080 interval=5s jitter=0s", - "fails=1 passes=1", + "health_check uri=/ port=8080 interval=5s jitter=0s fails=1 passes=1 keepalive_time=60s;", "slow_start=3h", "queue 100 timeout=60s;", "sticky cookie TestCookie expires=max domain=virtual-server-route.example.com httponly secure path=/some-valid/path;", @@ -590,6 +589,7 @@ class TestOptionsSpecificForPlus: "enable": True, "path": "/health", "interval": "15s", + "keepalive-time": "120s", "jitter": "3", "fails": 2, "passes": 2, @@ -605,16 +605,14 @@ class TestOptionsSpecificForPlus: "queue": {"size": 1000, "timeout": "66s"}, }, [ - "health_check uri=/health port=8080 interval=15s jitter=3", - "fails=2 passes=2 match=", - "proxy_pass https://vs", + "slow_start=0s", "status 200;", "proxy_connect_timeout 35s;", "proxy_read_timeout 45s;", "proxy_send_timeout 55s;", 'proxy_set_header Host "virtual-server.example.com";', - "slow_start=0s", - "queue 1000 timeout=66s;", + "proxy_pass https://vs", + "health_check uri=/health port=8080 interval=15s jitter=3s fails=2 passes=2 match=vs_backends-namespace_virtual-server-route_vsr_backend2-namespace_backend2_backend2_match keepalive_time=120s;", ], ), ], diff --git a/tests/suite/test_virtual_server_grpc.py b/tests/suite/test_virtual_server_grpc.py index b85a90076b..8e143af4c9 100644 --- a/tests/suite/test_virtual_server_grpc.py +++ b/tests/suite/test_virtual_server_grpc.py @@ -117,6 +117,7 @@ def test_config_after_setup( assert_grpc_entries_exist(config) assert_proxy_entries_do_not_exist(config) + @pytest.mark.flaky(max_runs=3) @pytest.mark.parametrize("backend_setup", [{"app_type": "grpc-vs"}], indirect=True) def test_validation_flow( self, kube_apis, ingress_controller_prerequisites, crd_ingress_controller, backend_setup, virtual_server_setup @@ -138,6 +139,7 @@ def test_validation_flow( self.patch_valid_vs(kube_apis, virtual_server_setup) wait_before_test() + @pytest.mark.flaky(max_runs=3) @pytest.mark.parametrize("backend_setup", [{"app_type": "grpc-vs"}], indirect=True) def test_connect_grpc_backend( self, kube_apis, ingress_controller_prerequisites, crd_ingress_controller, backend_setup, virtual_server_setup @@ -162,6 +164,7 @@ def test_connect_grpc_backend( print(e.details()) pytest.fail("RPC error was not expected during call, exiting...") + @pytest.mark.flaky(max_runs=3) @pytest.mark.parametrize("backend_setup", [{"app_type": "grpc-vs"}], indirect=True) def test_grpc_error_intercept( self, kube_apis, ingress_controller_prerequisites, crd_ingress_controller, backend_setup, virtual_server_setup @@ -283,7 +286,7 @@ def test_config_after_enable_healthcheck( f"{TEST_DATA}/virtual-server-grpc/virtual-server-healthcheck.yaml", virtual_server_setup.namespace, ) - + wait_before_test() config = get_vs_nginx_template_conf( kube_apis.v1, virtual_server_setup.namespace, diff --git a/tests/suite/test_virtual_server_upstream_options.py b/tests/suite/test_virtual_server_upstream_options.py index 29049153a2..3ce241f4cd 100644 --- a/tests/suite/test_virtual_server_upstream_options.py +++ b/tests/suite/test_virtual_server_upstream_options.py @@ -507,7 +507,7 @@ class TestOptionsSpecificForPlus: [ "health_check uri=/ interval=5s jitter=0s", "fails=1 passes=1", - "mandatory persistent", + "mandatory persistent", "keepalive_time=60s;", "slow_start=3h", "queue 100 timeout=60s;", @@ -536,7 +536,7 @@ class TestOptionsSpecificForPlus: [ "health_check uri=/ interval=5s jitter=0s", "fails=1 passes=1", - "mandatory persistent", + "mandatory persistent", "keepalive_time=60s;", "slow_start=3h", "queue 100 timeout=60s;", @@ -565,7 +565,7 @@ class TestOptionsSpecificForPlus: [ "health_check uri=/ interval=5s jitter=0s", "fails=1 passes=1", - "mandatory persistent", + "mandatory persistent", "keepalive_time=60s;", "slow_start=3h", "queue 100 timeout=60s;", @@ -597,8 +597,7 @@ class TestOptionsSpecificForPlus: "ntlm": True, }, [ - "health_check uri=/health port=8080 interval=15s jitter=3", - "fails=2 passes=2 match=", + "health_check uri=/health port=8080 interval=15s jitter=3s fails=2 passes=2 match=", "proxy_pass https://vs", "status 200;", "proxy_connect_timeout 35s;",