From 204946130ef403b79c5da630416eb0ab9f42ee56 Mon Sep 17 00:00:00 2001 From: Alex Zgabur Date: Mon, 24 Jun 2024 13:01:05 +0200 Subject: [PATCH] Add refresh to wait_until --- testsuite/gateway/gateway_api/gateway.py | 1 - testsuite/openshift/__init__.py | 1 + testsuite/policy/authorization/auth_config.py | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/testsuite/gateway/gateway_api/gateway.py b/testsuite/gateway/gateway_api/gateway.py index 7762728c..20e80866 100644 --- a/testsuite/gateway/gateway_api/gateway.py +++ b/testsuite/gateway/gateway_api/gateway.py @@ -78,7 +78,6 @@ def wait_for_ready(self, timeout: int = 10 * 60): """Waits for the gateway to be ready in the sense of is_ready(self)""" success = self.wait_until(lambda obj: self.__class__(obj.model).is_ready(), timelimit=timeout) assert success, "Gateway didn't get ready in time" - self.refresh() def is_affected_by(self, policy: Policy) -> bool: """Returns True, if affected by status is found within the object for the specific policy""" diff --git a/testsuite/openshift/__init__.py b/testsuite/openshift/__init__.py index 0589be97..de48f210 100644 --- a/testsuite/openshift/__init__.py +++ b/testsuite/openshift/__init__.py @@ -41,6 +41,7 @@ def wait_until(self, test_function, timelimit=60): success, _, _ = self.self_selector().until_all( success_func=lambda obj: test_function(self.__class__(obj.model)) ) + self.refresh() return success except OpenShiftPythonException as e: if "Timeout" in e.msg: diff --git a/testsuite/policy/authorization/auth_config.py b/testsuite/policy/authorization/auth_config.py index bff32dbf..2a162906 100644 --- a/testsuite/policy/authorization/auth_config.py +++ b/testsuite/policy/authorization/auth_config.py @@ -79,7 +79,6 @@ def wait_for_ready(self): and all(x.status == "True" for x in obj.model.status.conditions) ) assert success, f"{self.kind()} did not get ready in time" - self.refresh() @modify def add_rule(self, when: list[Rule]):