diff --git a/kuryr_tempest_plugin/config.py b/kuryr_tempest_plugin/config.py index c33ac9e1..d7a9926d 100644 --- a/kuryr_tempest_plugin/config.py +++ b/kuryr_tempest_plugin/config.py @@ -96,6 +96,9 @@ kuryr_k8s_opts = [ cfg.BoolOpt("test_services_without_selector", default=False, help="Whether or not service without selector tests will be " "running"), + cfg.BoolOpt("test_endpoints_object_removal", default=True, + help="Whether to check that LB members are deleted upon " + "endpoints object removal or not"), cfg.BoolOpt("test_configurable_listener_timeouts", default=False, help="Whether or not listener timeout values are " "configurable"), diff --git a/kuryr_tempest_plugin/tests/scenario/test_service.py b/kuryr_tempest_plugin/tests/scenario/test_service.py index e97f8a85..62571d1a 100644 --- a/kuryr_tempest_plugin/tests/scenario/test_service.py +++ b/kuryr_tempest_plugin/tests/scenario/test_service.py @@ -156,12 +156,13 @@ class TestServiceWithoutSelectorScenario(base.BaseKuryrScenarioTest): pool_query = "loadbalancer_id=%s" % klb_crd_id pool = self.wait_for_status(timeout, 15, self.pool_client.list_pools, query_params=pool_query) - pool_id = pool[0].get('id') - # Check that there no pool members after endpoint deletion - self.delete_endpoint(ep_name=self.endpoint.metadata.name, - namespace=ns_name) - self.check_lb_members(pool_id, 0) + if CONF.kuryr_kubernetes.test_endpoints_object_removal: + # Check that there are no pool members after endpoint deletion + pool_id = pool[0].get('id') + self.delete_endpoint(ep_name=self.endpoint.metadata.name, + namespace=ns_name) + self.check_lb_members(pool_id, 0) class TestSCTPServiceScenario(base.BaseKuryrScenarioTest):