Add test_k8s_ingress_nginx test
Change-Id: I11ae28ddfbe96cd4232ff428857ee69fe09ddffe
Closes-PROD: PROD-22257
diff --git a/tcp_tests/managers/k8s/ingresses.py b/tcp_tests/managers/k8s/ingresses.py
index 906dc31..5dd353c 100644
--- a/tcp_tests/managers/k8s/ingresses.py
+++ b/tcp_tests/managers/k8s/ingresses.py
@@ -14,6 +14,8 @@
from kubernetes import client
+from devops.helpers import helpers
+
from tcp_tests.managers.k8s.base import K8sBaseResource
from tcp_tests.managers.k8s.base import K8sBaseManager
@@ -41,6 +43,12 @@
self._manager.api.delete_namespaced_ingress(
self.name, self.namespace, client.V1DeleteOptions(), **kwargs)
+ def wait_ready(self, timeout=120, interval=2):
+ helpers.wait(
+ lambda: self.read().status.load_balancer.ingress is not None,
+ timeout=timeout, interval=interval)
+ return self
+
class K8sIngressManager(K8sBaseManager):
resource_class = K8sIngress