Fix resource leaks in EndPointGroupsTest

Test cases were creating services at the test case
scope and not add them to addCleanup method.

Change-Id: I390f9e013930477f32c537191adbef37e1b4dd1c
This commit is contained in:
Doug Schveninger 2019-05-03 06:41:37 -05:00
parent 661a52ed45
commit 23325c0ee8
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ class EndPointGroupsTest(base.BaseIdentityV3AdminTest):
@decorators.idempotent_id('7c69e7a1-f865-402d-a2ea-44493017315a')
def test_create_list_show_check_delete_endpoint_group(self):
service_id = self._create_service()
self.addCleanup(self.services_client.delete_service, service_id)
name = data_utils.rand_name('service_group')
description = data_utils.rand_name('description')
filters = {'service_id': service_id}
@ -129,6 +130,7 @@ class EndPointGroupsTest(base.BaseIdentityV3AdminTest):
# Creating an endpoint group so as to check update endpoint group
# with new values
service1_id = self._create_service()
self.addCleanup(self.services_client.delete_service, service1_id)
name = data_utils.rand_name('service_group')
description = data_utils.rand_name('description')
filters = {'service_id': service1_id}