Minor cleanup on the TestCapsule class

Change-Id: I7d30bb9e8d1e886ce033247b2a21595dfac4d80b
This commit is contained in:
Hongbin Lu 2019-02-17 16:23:55 +00:00
parent 499783e8fd
commit 8a685f86b3

View File

@ -34,23 +34,6 @@ class TestCapsule(base.BaseZunTest):
) )
return clients.Manager(manager.credentials) return clients.Manager(manager.credentials)
@classmethod
def setup_clients(cls):
super(TestCapsule, cls).setup_clients()
cls.images_client = cls.os_primary.images_client
cls.sgs_client = cls.os_primary.sgs_client
@classmethod
def resource_setup(cls):
super(TestCapsule, cls).resource_setup()
def setUp(self):
super(TestCapsule, self).setUp()
self.capsules = []
def tearDown(self):
super(TestCapsule, self).tearDown()
@decorators.idempotent_id('d5c91423-0f83-44f8-8228-e6a28ef7817e') @decorators.idempotent_id('d5c91423-0f83-44f8-8228-e6a28ef7817e')
def test_create_capsule(self): def test_create_capsule(self):
self._create_capsule() self._create_capsule()
@ -59,7 +42,6 @@ class TestCapsule(base.BaseZunTest):
gen_model = datagen.capsule_data(**kwargs) gen_model = datagen.capsule_data(**kwargs)
resp, model = self.container_client.post_capsule(gen_model) resp, model = self.container_client.post_capsule(gen_model)
self.addCleanup(self.container_client.delete_capsule, model.uuid) self.addCleanup(self.container_client.delete_capsule, model.uuid)
self.capsules.append(model.uuid)
self.assertEqual(202, resp.status) self.assertEqual(202, resp.status)
# Wait for container to finish creation # Wait for container to finish creation
self.container_client.ensure_capsule_in_desired_state( self.container_client.ensure_capsule_in_desired_state(