diff --git a/tests/suite/test_transport_server_external_name.py b/tests/suite/test_transport_server_external_name.py index f0f77a526b..a676edf9a7 100644 --- a/tests/suite/test_transport_server_external_name.py +++ b/tests/suite/test_transport_server_external_name.py @@ -120,7 +120,7 @@ def test_template_config( ts_externalname_setup.ic_pod_name, ingress_controller_prerequisites.namespace, ) - retry = +1 + retry = retry + 1 assert resolver_count == 2 # one for http and other for stream context assert ( diff --git a/tests/suite/test_transport_server_service_insight.py b/tests/suite/test_transport_server_service_insight.py index 9bda5959f3..96cde1cdc1 100644 --- a/tests/suite/test_transport_server_service_insight.py +++ b/tests/suite/test_transport_server_service_insight.py @@ -140,7 +140,7 @@ def test_ts_service_insight( while (resp.json() != {"Total": 1, "Up": 1, "Unhealthy": 0}) and retry < 5: resp = requests.get(service_insight_endpoint) wait_before_test() - retry = +1 + retry = retry + 1 assert resp.json() == {"Total": 1, "Up": 1, "Unhealthy": 0} @@ -199,5 +199,5 @@ def test_ts_service_insight_https( while (resp.json() != {"Total": 1, "Up": 1, "Unhealthy": 0}) and retry < 5: resp = requests.get(service_insight_endpoint, verify=False) wait_before_test() - retry = +1 + retry = retry + 1 assert resp.json() == {"Total": 1, "Up": 1, "Unhealthy": 0} diff --git a/tests/suite/test_virtual_server_backup_service.py b/tests/suite/test_virtual_server_backup_service.py index 5a4ae02587..776fd62d9c 100644 --- a/tests/suite/test_virtual_server_backup_service.py +++ b/tests/suite/test_virtual_server_backup_service.py @@ -42,7 +42,7 @@ def get_result_in_conf_with_retry( ic_pod_name, ic_pod_namespace, ) - retry = +1 + retry = retry + 1 return result_conf diff --git a/tests/suite/test_virtual_server_error_pages.py b/tests/suite/test_virtual_server_error_pages.py index 6072ae573d..046130a53c 100644 --- a/tests/suite/test_virtual_server_error_pages.py +++ b/tests/suite/test_virtual_server_error_pages.py @@ -43,7 +43,7 @@ def test_redirect_strategy(self, kube_apis, crd_ingress_controller, virtual_serv print(f"redirect to uri: {resp.next.url}") except AttributeError as e: print(f"Exception occurred: {e}") - retry = +1 + retry = retry + 1 continue break assert f"http://{virtual_server_setup.vs_host}/error.html" in resp.next.url diff --git a/tests/suite/test_virtual_server_service_insight.py b/tests/suite/test_virtual_server_service_insight.py index 81cea90823..0f2149e012 100644 --- a/tests/suite/test_virtual_server_service_insight.py +++ b/tests/suite/test_virtual_server_service_insight.py @@ -41,7 +41,7 @@ def test_responses_svc_insight_http( while (resp.json() != {"Total": 3, "Up": 3, "Unhealthy": 0}) and retry < 5: resp = requests.get(req_url) wait_before_test() - retry = +1 + retry = retry + 1 assert resp.status_code == 200, f"Expected 200 code for /probe/{host} but got {resp.status_code}" assert resp.json() == {"Total": 3, "Up": 3, "Unhealthy": 0} @@ -99,7 +99,7 @@ def test_responses_svc_insight_https( while (resp.json() != {"Total": 3, "Up": 3, "Unhealthy": 0}) and retry < 5: resp = requests.get(req_url, verify=False) wait_before_test() - retry = +1 + retry = retry + 1 assert resp.status_code == 200, f"Expected 200 code for /probe/{host} but got {resp.status_code}" assert resp.json() == {"Total": 3, "Up": 3, "Unhealthy": 0} @@ -129,6 +129,6 @@ def test_responses_svc_insight_update_pods( while (resp.json() != {"Total": 6, "Up": 6, "Unhealthy": 0}) and retry < 5: resp = requests.get(req_url, verify=False) wait_before_test() - retry = +1 + retry = retry + 1 assert resp.status_code == 200, f"Expected 200 code for /probe/{host} but got {resp.status_code}" assert resp.json() == {"Total": 6, "Up": 6, "Unhealthy": 0} diff --git a/tests/suite/test_watch_namespace.py b/tests/suite/test_watch_namespace.py index cd28215199..743bd799a5 100644 --- a/tests/suite/test_watch_namespace.py +++ b/tests/suite/test_watch_namespace.py @@ -114,7 +114,7 @@ def test_response_codes(self, ingress_controller, backend_setup, expected_respon retry = 0 while resp.status_code != expected_responses[ing] and retry < 3: resp = requests.get(backend_setup.req_url, headers={"host": backend_setup.ingress_hosts[ing]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == expected_responses[ing] diff --git a/tests/suite/test_watch_namespace_label.py b/tests/suite/test_watch_namespace_label.py index 75d3c88d79..53cd6fe9c0 100644 --- a/tests/suite/test_watch_namespace_label.py +++ b/tests/suite/test_watch_namespace_label.py @@ -140,7 +140,7 @@ def test_response_codes(self, kube_apis, ingress_controller, backend_setup, expe retry = 0 while resp.status_code != expected_responses[ing] and retry < 3: resp = requests.get(backend_setup.req_url, headers={"host": backend_setup.resource_hosts[ing]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == expected_responses[ing] @@ -155,7 +155,7 @@ def test_response_codes(self, kube_apis, ingress_controller, backend_setup, expe ing = "foreign-ns-ingress" while resp.status_code != 200 and retry < 3: resp = requests.get(backend_setup.req_url, headers={"host": backend_setup.resource_hosts[ing]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == 200 @@ -169,7 +169,7 @@ def test_response_codes(self, kube_apis, ingress_controller, backend_setup, expe retry = 0 while resp.status_code != expected_responses[ing] and retry < 3: resp = requests.get(backend_setup.req_url, headers={"host": backend_setup.resource_hosts[ing]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == expected_responses[ing] @@ -197,7 +197,7 @@ def test_response_codes(self, kube_apis, crd_ingress_controller, backend_setup_v retry = 0 while resp.status_code != expected_responses[vs] and retry < 3: resp = requests.get(backend_setup_vs.req_url, headers={"host": backend_setup_vs.resource_hosts[vs]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == expected_responses[vs] @@ -212,7 +212,7 @@ def test_response_codes(self, kube_apis, crd_ingress_controller, backend_setup_v vs = "foreign-ns-vs" while resp.status_code != 200 and retry < 3: resp = requests.get(backend_setup_vs.req_url, headers={"host": backend_setup_vs.resource_hosts[vs]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == 200 @@ -226,7 +226,7 @@ def test_response_codes(self, kube_apis, crd_ingress_controller, backend_setup_v retry = 0 while resp.status_code != expected_responses[vs] and retry < 3: resp = requests.get(backend_setup_vs.req_url, headers={"host": backend_setup_vs.resource_hosts[vs]}) - retry = +1 + retry = retry + 1 wait_before_test() assert ( resp.status_code == expected_responses[vs] diff --git a/tests/suite/test_watch_secret_namespace.py b/tests/suite/test_watch_secret_namespace.py index fee4878bc9..fd775b2663 100644 --- a/tests/suite/test_watch_secret_namespace.py +++ b/tests/suite/test_watch_secret_namespace.py @@ -57,7 +57,7 @@ def test_responses( except requests.exceptions.SSLError as e: exception = str(e) print(f"SSL certificate exception: {exception}") - retry = +1 + retry = retry + 1 assert resp.status_code == 200