From cf94a14b265f67b7cc8f72f08308adddc5c4fe78 Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Sun, 9 Jun 2013 17:21:15 +0200 Subject: [PATCH] Fix: WhiteBox server leak Deleteting the server explicity in the tearDownClass. Fixing Bug 1180852 Change-Id: If94c82717832ef35473840b793fcfd6871bbf4bd --- tempest/whitebox/test_images_whitebox.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tempest/whitebox/test_images_whitebox.py b/tempest/whitebox/test_images_whitebox.py index 096d3bf27..dc683368f 100644 --- a/tempest/whitebox/test_images_whitebox.py +++ b/tempest/whitebox/test_images_whitebox.py @@ -20,6 +20,10 @@ from tempest.common.utils.data_utils import rand_name from tempest import exceptions 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): _interface = 'json' @@ -34,7 +38,8 @@ class ImagesWhiteboxTest(manager.ComputeWhiteboxTest, base.BaseComputeTest): @classmethod 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: cls.client.delete_image(image_id) cls.image_ids.remove(image_id)