Merge "Create service with UDP protocol"

This commit is contained in:
Zuul 2018-08-17 19:41:17 +00:00 committed by Gerrit Code Review
commit f510c8411d
2 changed files with 10 additions and 3 deletions

View File

@ -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)

View File

@ -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()