Service cleanup should be optional
Adding an option to remove or not remove the service as a part of a create_setup_for_service_test function Change-Id: I933a417d17f8106f51cadf05c53ae3c3ba00153d
This commit is contained in:
parent
d35a5d5c0e
commit
4673523697
|
@ -470,7 +470,7 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest):
|
|||
protocol="TCP", port=80,
|
||||
target_port=8080, label=None,
|
||||
namespace="default", get_ip=True,
|
||||
service_name=None):
|
||||
service_name=None, cleanup=True):
|
||||
|
||||
label = label or data_utils.rand_name('kuryr-app')
|
||||
for i in range(pod_num):
|
||||
|
@ -499,8 +499,9 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest):
|
|||
actual_be, pod_num)
|
||||
raise lib_exc.ServerFault()
|
||||
|
||||
cls.addClassResourceCleanup(cls.delete_service, service_name,
|
||||
namespace=namespace)
|
||||
if cleanup:
|
||||
cls.addClassResourceCleanup(cls.delete_service, service_name,
|
||||
namespace=namespace)
|
||||
|
||||
@classmethod
|
||||
def create_namespace(cls, name=None):
|
||||
|
|
Loading…
Reference in New Issue