test: fix e2e issues
diff --git a/atmosphere/tests/e2e/test_operator.py b/atmosphere/tests/e2e/test_operator.py
index c4d9ddd..1c5e728 100644
--- a/atmosphere/tests/e2e/test_operator.py
+++ b/atmosphere/tests/e2e/test_operator.py
@@ -7,6 +7,7 @@
import toml
from jinja2 import Environment, FileSystemLoader
from python_on_whales import docker
+from tenacity import Retrying, retry_if_exception_type, stop_after_delay
@pytest.fixture
@@ -62,7 +63,11 @@
for pod in pykube.Pod.objects(kind_cluster.api, namespace="openstack").filter(
selector="application=atmosphere"
):
- assert "successfully started" in pod.logs()
+ for attempt in Retrying(
+ retry=retry_if_exception_type(AssertionError), stop=stop_after_delay(30)
+ ):
+ with attempt:
+ assert "successfully started" in pod.logs()
for secret_name in ["atmosphere-config", "atmosphere-memcached"]:
secret = pykube.Secret.objects(