Allow nova vmdk-footer test to pass
Nova originally did not support vmdk-with-footer and the test asserted
that fact. Now we need to fix nova and have this test work with both
fixed and non-fixed code. Since the tests are not split by image
format, we can easily skip in the case where an image is marked as
usable, but fails in a known way, which will allow us to pass the
job with and without a fixed nova.
Change-Id: I71268fa915055300e1cb42e592bc62a1f276d733
diff --git a/tempest/api/image/v2/test_images_formats.py b/tempest/api/image/v2/test_images_formats.py
index a234fa2..45626a6 100644
--- a/tempest/api/image/v2/test_images_formats.py
+++ b/tempest/api/image/v2/test_images_formats.py
@@ -168,8 +168,15 @@
# https://bugs.launchpad.net/glance/+bug/2073262
is_broken = 'footer' in self.imgdef['name']
- if self.imgdef['usable'] and not is_broken:
- server = self._create_server_with_image_def(self.imgdef)
+ if self.imgdef['usable']:
+ try:
+ server = self._create_server_with_image_def(self.imgdef)
+ except exceptions.BuildErrorException:
+ if is_broken:
+ self.skip('Tolerating failed build with known-broken '
+ 'image format')
+ else:
+ raise
self.delete_server(server['id'])
else:
self.assertRaises(exceptions.BuildErrorException,