Moves an incorrectly marked negative test
The following test had been marked as negative by mistake. This commits
moves it back to the positive test file.
tempest.api.compute.images.test_images:ImagesNegativeTestJSON.test_create_image_from_stopped_server
Change-Id: I61dc6fbdf269e69e76edbf5d393da64d48bb1d5e
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index 0324df2..dc62620 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -14,6 +14,7 @@
from tempest.api.compute import base
from tempest.common.utils import data_utils
+from tempest.common import waiters
from tempest import config
from tempest import test
@@ -48,3 +49,18 @@
name=snapshot_name,
wait_until='SAVING')
self.client.delete_image(image['id'])
+
+ @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
+ def test_create_image_from_stopped_server(self):
+ server = self.create_test_server(wait_until='ACTIVE')
+ self.servers_client.stop_server(server['id'])
+ waiters.wait_for_server_status(self.servers_client,
+ server['id'], 'SHUTOFF')
+ self.addCleanup(self.servers_client.delete_server, server['id'])
+ snapshot_name = data_utils.rand_name('test-snap')
+ image = self.create_image_from_server(server['id'],
+ name=snapshot_name,
+ wait_until='ACTIVE',
+ wait_for_server=False)
+ self.addCleanup(self.client.delete_image, image['id'])
+ self.assertEqual(snapshot_name, image['name'])
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index 126d092..9197adf 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -71,22 +71,6 @@
'!@#$%^&*()', name=name, meta=meta)
@test.attr(type=['negative'])
- @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
- def test_create_image_from_stopped_server(self):
- server = self.create_test_server(wait_until='ACTIVE')
- self.servers_client.stop_server(server['id'])
- waiters.wait_for_server_status(self.servers_client,
- server['id'], 'SHUTOFF')
- self.addCleanup(self.servers_client.delete_server, server['id'])
- snapshot_name = data_utils.rand_name('test-snap')
- image = self.create_image_from_server(server['id'],
- name=snapshot_name,
- wait_until='ACTIVE',
- wait_for_server=False)
- self.addCleanup(self.client.delete_image, image['id'])
- self.assertEqual(snapshot_name, image['name'])
-
- @test.attr(type=['negative'])
@test.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538')
def test_create_image_specify_uuid_35_characters_or_less(self):
# Return an error if Image ID passed is 35 characters or less