Remove skips in test server rescue
* Remove skips test_rescued_vm_add_remove_security_group
* Fixes two issues
1. In remove_security_group pass self.sg_name instead of sg_id which was
failing earlier.
2. Before executing unrescue server operation, the server status seems to
be active hence the bug 1126257. So adding a rescue operation at the
start of the test to fix the bug
Fixes bug 1126257
Change-Id: Ie79b94b9cde0f35bb4ea5955bc284139d85123cb
diff --git a/tempest/tests/compute/servers/test_server_rescue.py b/tempest/tests/compute/servers/test_server_rescue.py
index 91010ce..97766e0 100644
--- a/tempest/tests/compute/servers/test_server_rescue.py
+++ b/tempest/tests/compute/servers/test_server_rescue.py
@@ -15,8 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import testtools
-
from tempest.common.utils.data_utils import rand_name
import tempest.config
from tempest import exceptions
@@ -193,8 +191,12 @@
self.assertEqual(202, resp.status)
@attr(type='positive')
- @testtools.skip("Skipped until Bug #1126257 is resolved")
def test_rescued_vm_add_remove_security_group(self):
+ # Rescue the server
+ self.servers_client.rescue_server(
+ self.server_id, self.password)
+ self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
+
#Add Security group
resp, body = self.servers_client.add_security_group(self.server_id,
self.sg_name)
@@ -202,7 +204,7 @@
#Delete Security group
resp, body = self.servers_client.remove_security_group(self.server_id,
- self.sg_id)
+ self.sg_name)
self.assertEqual(202, resp.status)
# Unrescue the server