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-29 17:00:17 +0000
commit437d63de296f387d0556527bbe9fc97969a2e3db (patch)
treed712ddb72fe065caeeee6b29fa7385808511dedc
parent25afea2adb7c23fafcf1ea6261ba26f98010b0d3 (diff)
downloadpython-novaclient-stable/ussuri.tar.gz
Add a cleanup for a server in a functional testussuri-em17.0.1stable/ussuri
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> (cherry picked from commit 1ce9edcd73c6da9dd4dcded12747957fc297cb21)
-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")