summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-21 11:22:41 +0000
committerGerrit Code Review <review@openstack.org>2019-01-21 11:22:41 +0000
commita37f46e7815aac4bbd647fe0c8c0d7e38111160e (patch)
tree01fee0940b71615f810ea46ce4685aebdd4c385b
parentd35a5d5c0e4280816b7b17360b6cb282cdd2d0db (diff)
parent2a1967558841c1b8dcbf16c654d48ef12d9de936 (diff)
Merge "Checking connectivity from host to pod/service in the namespace"HEADmaster
-rw-r--r--kuryr_tempest_plugin/tests/scenario/test_namespace.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/kuryr_tempest_plugin/tests/scenario/test_namespace.py b/kuryr_tempest_plugin/tests/scenario/test_namespace.py
index 59fe48b..806f6a6 100644
--- a/kuryr_tempest_plugin/tests/scenario/test_namespace.py
+++ b/kuryr_tempest_plugin/tests/scenario/test_namespace.py
@@ -235,6 +235,26 @@ class TestNamespaceScenario(base.BaseKuryrScenarioTest):
235 self._delete_namespace_resources(ns2_name, net_crd_ns2, 235 self._delete_namespace_resources(ns2_name, net_crd_ns2,
236 subnet_ns2_name) 236 subnet_ns2_name)
237 237
238 @decorators.idempotent_id('bddd5441-1244-429d-a125-b53ddfb132a9')
239 def test_host_to_namespace_connectivity(self):
240 # Create namespace and pod and service in that namespace
241 namespace_name, namespace = self.create_namespace()
242 self.addCleanup(self.delete_namespace, namespace_name)
243 # Check host to namespace pod and service connectivity
244 pod_name, pod = self.create_pod(labels={"app": 'pod-label'},
245 namespace=namespace_name)
246 pod_ip = self.get_pod_ip(pod_name, namespace=namespace_name)
247 svc_name, _ = self.create_service(pod_label=pod.metadata.labels,
248 namespace=namespace_name)
249 service_ip = self.get_service_ip(service_name=svc_name,
250 namespace=namespace_name)
251 self.wait_service_status(service_ip,
252 CONF.kuryr_kubernetes.lb_build_timeout)
253 # Check connectivity to pod and service in the namespace
254 self.ping_ip_address(pod_ip)
255 resp = requests.get("http://{dst_ip}".format(dst_ip=service_ip))
256 self.assertEqual(resp.status_code, 200)
257
238 def _delete_namespace_resources(self, namespace, net_crd, subnet): 258 def _delete_namespace_resources(self, namespace, net_crd, subnet):
239 # Check resources are deleted 259 # Check resources are deleted
240 self.delete_namespace(namespace) 260 self.delete_namespace(namespace)