LP Bug#914770 - NameError in test_images
Thanks to bcwaldon for making me look silly :) Now checks the location header returned from createImage call in the case when the image is erroneously created and should then be deleted... Change-Id: Iec303355ccb7d19fd4667462b82fc8e95bdafde7
This commit is contained in:
parent
277970d9cc
commit
04b7081422
tempest
@ -258,7 +258,6 @@ class ServersClient(object):
|
||||
post_body = json.dumps(post_body)
|
||||
resp, body = self.client.post('servers/%s/action' %
|
||||
str(server_id), post_body, self.headers)
|
||||
body = json.loads(body)
|
||||
return resp, body
|
||||
|
||||
def list_server_metadata(self, server_id):
|
||||
|
@ -61,7 +61,7 @@ class ImagesTest(unittest.TestCase):
|
||||
|
||||
@attr(type='negative')
|
||||
def test_create_image_from_deleted_server(self):
|
||||
"""An image should not be created as the server instance is removed """
|
||||
"""An image should not be created if the server instance is removed """
|
||||
server_name = rand_name('server')
|
||||
resp, server = self.servers_client.create_server(server_name,
|
||||
self.image_ref,
|
||||
@ -81,6 +81,6 @@ class ImagesTest(unittest.TestCase):
|
||||
pass
|
||||
|
||||
else:
|
||||
self.fail("should not create snapshot from deleted instance")
|
||||
# Delete Image in case the test filed and image created
|
||||
self.client.delete_image(image['id'])
|
||||
self.fail("Should not create snapshot from deleted instance!")
|
||||
image_id = _parse_image_id(resp.['location'])
|
||||
self.client.delete_image(image_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user