summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2020-07-28 16:24:13 +0000
committerTakashi Natsume <takanattie@gmail.com>2020-07-28 16:36:28 +0000
commit1ce9edcd73c6da9dd4dcded12747957fc297cb21 (patch)
tree7aed3e2adc43c22d1ff5ab9e689fd942f42b9cf0
parent1322199845a095bafd0a16900f4899283fd0fabe (diff)
downloadpython-novaclient-1ce9edcd73c6da9dd4dcded12747957fc297cb21.tar.gz
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 <takanattie@gmail.com>
-rw-r--r--novaclient/tests/functional/v2/test_instance_action.py2
1 files changed, 2 insertions, 0 deletions
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")