Fix: WhiteBox server leak
Deleteting the server explicity in the tearDownClass. Fixing Bug 1180852 Change-Id: If94c82717832ef35473840b793fcfd6871bbf4bd
This commit is contained in:
@@ -20,6 +20,10 @@ from tempest.common.utils.data_utils import rand_name
|
|||||||
from tempest import exceptions
|
from tempest import exceptions
|
||||||
from tempest.whitebox import manager
|
from tempest.whitebox import manager
|
||||||
|
|
||||||
|
#TODO(afazekas): The whitebox tests are using complex testclass/manager
|
||||||
|
# hierarchy, without a real need. It is difficult to maintain.
|
||||||
|
# They could share more code with scenario tests.
|
||||||
|
|
||||||
|
|
||||||
class ImagesWhiteboxTest(manager.ComputeWhiteboxTest, base.BaseComputeTest):
|
class ImagesWhiteboxTest(manager.ComputeWhiteboxTest, base.BaseComputeTest):
|
||||||
_interface = 'json'
|
_interface = 'json'
|
||||||
@@ -34,7 +38,8 @@ class ImagesWhiteboxTest(manager.ComputeWhiteboxTest, base.BaseComputeTest):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
"""Delete images after a test is executed."""
|
"""Delete images and server after a test is executed."""
|
||||||
|
cls.servers_client.delete_server(cls.shared_server['id'])
|
||||||
for image_id in cls.image_ids:
|
for image_id in cls.image_ids:
|
||||||
cls.client.delete_image(image_id)
|
cls.client.delete_image(image_id)
|
||||||
cls.image_ids.remove(image_id)
|
cls.image_ids.remove(image_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user