From 437d63de296f387d0556527bbe9fc97969a2e3db Mon Sep 17 00:00:00 2001 From: Takashi Natsume Date: Tue, 28 Jul 2020 16:24:13 +0000 Subject: Add a cleanup for a server in a functional test A VM instance is created in the following functional test. * novaclient.tests.functional.v2.test_instance_action. TestInstanceActionCLIV262.test_show_actions_with_host However the VM instance is not deleted after the functional test. Add a cleanup for the server in the functional test. Change-Id: I8c2a6f91739d50baa283b37b16de67c542ea691b Closes-Bug: #1889283 Signed-off-by: Takashi Natsume (cherry picked from commit 1ce9edcd73c6da9dd4dcded12747957fc297cb21) --- novaclient/tests/functional/v2/test_instance_action.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/novaclient/tests/functional/v2/test_instance_action.py b/novaclient/tests/functional/v2/test_instance_action.py index 45849b95..faeafe0f 100644 --- a/novaclient/tests/functional/v2/test_instance_action.py +++ b/novaclient/tests/functional/v2/test_instance_action.py @@ -136,6 +136,8 @@ class TestInstanceActionCLIV262(TestInstanceActionCLIV258, server = self.another_nova('boot --flavor %s --image %s --poll %s' % (self.flavor.name, self.image.name, name)) server_id = self._get_value_from_the_table(server, 'id') + self.addCleanup(self.client.servers.delete, server_id) + output = self.nova("instance-action-list %s" % server_id) request_id = self._get_column_value_from_single_row_table( output, "Request_ID") -- cgit v1.2.1