From 6619298fc17b0cf8b9c0bd0be53162139c802eee Mon Sep 17 00:00:00 2001 From: Eoghan Glynn Date: Thu, 15 Mar 2012 13:44:56 +0000 Subject: [PATCH] Ensure copy and original image IDs differ. 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 --- glance/tests/functional/test_copy_to_file.py | 1 + glance/tests/functional/test_s3.py | 1 + glance/tests/functional/test_swift.py | 1 + 3 files changed, 3 insertions(+) diff --git a/glance/tests/functional/test_copy_to_file.py b/glance/tests/functional/test_copy_to_file.py index 6fc94e9293..1992f7844d 100644 --- a/glance/tests/functional/test_copy_to_file.py +++ b/glance/tests/functional/test_copy_to_file.py @@ -111,6 +111,7 @@ class TestCopyToFile(functional.FunctionalTest): 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, diff --git a/glance/tests/functional/test_s3.py b/glance/tests/functional/test_s3.py index 79fdf066b8..88675f1b8b 100644 --- a/glance/tests/functional/test_s3.py +++ b/glance/tests/functional/test_s3.py @@ -209,6 +209,7 @@ class TestS3(test_api.TestApi): 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, diff --git a/glance/tests/functional/test_swift.py b/glance/tests/functional/test_swift.py index 4e36cc4034..46acc957d9 100644 --- a/glance/tests/functional/test_swift.py +++ b/glance/tests/functional/test_swift.py @@ -480,6 +480,7 @@ class TestSwift(test_api.TestApi): 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,