From ff76e492c2fb964a536efe48546e1e6575ef07aa Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Tue, 19 Dec 2017 16:26:29 +0900 Subject: [PATCH] Use addClassResourceCleanup in test_container_sync This patch is to use addClassResourceCleanup for the test_container_sync. Change-Id: Ic534495de3d369dd9b69adc13dcc6bfb7edc9e4c --- tempest/api/object_storage/test_container_sync.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py index 042d288d77..0477d91fcd 100644 --- a/tempest/api/object_storage/test_container_sync.py +++ b/tempest/api/object_storage/test_container_sync.py @@ -72,14 +72,12 @@ class ContainerSyncTest(base.BaseObjectTest): (cls.container_client_alt, cls.object_client_alt) for cont_name, client in cls.clients.items(): client[0].create_container(cont_name) + cls.addClassResourceCleanup(base.delete_containers, + cont_name, + client[0], + client[1]) cls.containers.append(cont_name) - @classmethod - def resource_cleanup(cls): - for client in cls.clients.values(): - cls.delete_containers(client[0], client[1]) - super(ContainerSyncTest, cls).resource_cleanup() - def _test_container_synchronization(self, make_headers): # container to container synchronization # to allow/accept sync requests to/from other accounts