Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Ryan committed Jul 1, 2024
1 parent b04925e commit 17cf80e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 5 additions & 7 deletions tests/suite/test_v_s_route_upstream_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;",
Expand All @@ -590,6 +589,7 @@ class TestOptionsSpecificForPlus:
"enable": True,
"path": "/health",
"interval": "15s",
"keepalive-time": "120s",
"jitter": "3",
"fails": 2,
"passes": 2,
Expand All @@ -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;",
],
),
],
Expand Down
5 changes: 4 additions & 1 deletion tests/suite/test_virtual_server_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 4 additions & 5 deletions tests/suite/test_virtual_server_upstream_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;",
Expand Down Expand Up @@ -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;",
Expand Down Expand Up @@ -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;",
Expand Down Expand Up @@ -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;",
Expand Down

0 comments on commit 17cf80e

Please sign in to comment.