From f2c9485ca8b93875db2dec1944754293771c21cf Mon Sep 17 00:00:00 2001 From: Genadi Date: Wed, 25 Jul 2018 12:39:19 +0300 Subject: [PATCH] Create service with UDP protocol Check that kuryr-controller doesn't crash when creating a service with UDP protocol Change-Id: I553fc1dca7cfdd227a167ac1ebb0d9596c2a1caf --- kuryr_tempest_plugin/tests/scenario/base.py | 6 +++--- kuryr_tempest_plugin/tests/scenario/test_service.py | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kuryr_tempest_plugin/tests/scenario/base.py b/kuryr_tempest_plugin/tests/scenario/base.py index e08a0c03..4f9e16bb 100644 --- a/kuryr_tempest_plugin/tests/scenario/base.py +++ b/kuryr_tempest_plugin/tests/scenario/base.py @@ -252,8 +252,8 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest): @classmethod def create_setup_for_service_test(cls, pod_num=2, spec_type="ClusterIP", - label=None, namespace="default", - get_ip=True): + protocol="TCP", label=None, + namespace="default", get_ip=True): label = label or data_utils.rand_name('kuryr-app') for i in range(pod_num): pod_name, pod = cls.create_pod( @@ -262,7 +262,7 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest): namespace=namespace) service_name, service_obj = cls.create_service( pod_label=pod.metadata.labels, spec_type=spec_type, - namespace=namespace) + protocol=protocol, namespace=namespace) if get_ip: cls.service_ip = cls.get_service_ip( service_name, spec_type=spec_type, namespace=namespace) diff --git a/kuryr_tempest_plugin/tests/scenario/test_service.py b/kuryr_tempest_plugin/tests/scenario/test_service.py index 8907e014..c1349b39 100644 --- a/kuryr_tempest_plugin/tests/scenario/test_service.py +++ b/kuryr_tempest_plugin/tests/scenario/test_service.py @@ -121,3 +121,10 @@ class TestLoadBalancerServiceScenario(base.BaseKuryrScenarioTest): # creation of service with unsupported type self.create_setup_for_service_test(spec_type="NodePort", get_ip=False) self.check_controller_pod_status_for_time_period() + + @decorators.idempotent_id('bddf5441-1244-449d-a125-b5fdbfc1b2a8') + def test_unsupported_service_protocol(self): + # Testing that kuryr controller didn't crash for 20*5 seconds since + # creation of service with unsupported protocol + self.create_setup_for_service_test(protocol="UDP", get_ip=False) + self.check_controller_pod_status_for_time_period()