Skip to content

Commit

Permalink
Ensure copy and original image IDs differ.
Browse files Browse the repository at this point in the history
Ensure the copy_from tests have unmarshalled a distinct ID for the
copied image, in order to eliminate the possibility that the subsequent
deletion of the original image impacts on the existence of the copy.

Eliminates one bizarre and unlikely explanation for the test failures
reported in bug 955527.

Change-Id: If8d0720f6d08cdc57a3e01431bd3460d95a868a9
  • Loading branch information
Eoghan Glynn committed Mar 15, 2012
1 parent 50e5d35 commit 6619298
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions glance/tests/functional/test_copy_to_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def _do_test_copy_from(self, from_store, get_uri):
data = json.loads(content)

copy_image_id = data['image']['id']
self.assertNotEqual(copy_image_id, original_image_id)

# GET image and make sure image content is as expected
path = "http://%s:%d/v1/images/%s" % ("0.0.0.0", self.api_port,
Expand Down
1 change: 1 addition & 0 deletions glance/tests/functional/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def _do_test_copy_from(self, from_store, get_uri):
data = json.loads(content)

copy_image_id = data['image']['id']
self.assertNotEqual(copy_image_id, original_image_id)

# GET image and make sure image content is as expected
path = "http://%s:%d/v1/images/%s" % ("0.0.0.0", self.api_port,
Expand Down
1 change: 1 addition & 0 deletions glance/tests/functional/test_swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def _do_test_copy_from(self, from_store, get_uri):
data = json.loads(content)

copy_image_id = data['image']['id']
self.assertNotEqual(copy_image_id, original_image_id)

# GET image and make sure image content is as expected
path = "http://%s:%d/v1/images/%s" % ("0.0.0.0", self.api_port,
Expand Down

0 comments on commit 6619298

Please sign in to comment.