From f8f69dc2edd0da19e2726a5e2068dd22e7ced0a2 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Tue, 27 Mar 2012 14:30:37 +1100 Subject: A missing checksum does not mean the image is corrupt. This is a logic error in the code. A missing checksum should not imply that the image is corrupt. Note that corrupt images are only logged, not removed, so there is no data loss for users with this bug. Change-Id: Ic644517d3b8e9646fe943e5cef485c4168ebb5b5 --- nova/tests/test_imagecache.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py index c748abbae..09f5f9fce 100644 --- a/nova/tests/test_imagecache.py +++ b/nova/tests/test_imagecache.py @@ -660,6 +660,9 @@ class ImageCacheManagerTestCase(test.TestCase): fq_path('%s_10737418240' % hashed_1)]: self.assertTrue(rem in image_cache_manager.removable_base_files) + # Ensure there are no "corrupt" images as well + self.assertTrue(len(image_cache_manager.corrupt_base_files), 0) + def test_verify_base_images_no_base(self): self.flags(instances_path='/tmp/no/such/dir/name/please') image_cache_manager = imagecache.ImageCacheManager() -- cgit