From 7a547df426a505d987dd53efb2f59d6ec2f63af8 Mon Sep 17 00:00:00 2001 From: Kevin_Zheng Date: Thu, 27 Apr 2017 18:00:13 +0800 Subject: [PATCH] Fix volume attach tests failing when using FIP as ssh method When use floating as connect_method, tests: test_attach_detach_volume[id-52e9045a-e90d-4c0d-9087-79d657faffff] test_list_get_volume_attachments[id-7fa563fe-f0f7-43eb-9e22-a1ece036b513] will fail due to that they are under the same class, so when these tests setup, and using floating as connect_method only one floating IP was created.We first associated it to instance created at test1 and then we created another instance in test2 and tried to associate this IP again to the new server, since the IP was already associated to instance created in test1, error will happen when try to do this. This patch fix this by delete the servers after first test finished. Closes-Bug: #1686664 Change-Id: Ie3afb31bd0d3245760f799b2256228159b328619 --- tempest/api/compute/volumes/test_attach_volume.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py index b0a6622781..4665eb1d55 100644 --- a/tempest/api/compute/volumes/test_attach_volume.py +++ b/tempest/api/compute/volumes/test_attach_volume.py @@ -52,6 +52,7 @@ class AttachVolumeTestJSON(base.BaseV2ComputeTest): validatable=True, wait_until='ACTIVE', adminPass=self.image_ssh_password) + self.addCleanup(self.delete_server, server['id']) # Record addresses so that we can ssh later server['addresses'] = self.servers_client.list_addresses( server['id'])['addresses']