diff --git a/tempest/api/compute/flavors/test_flavors_negative.py b/tempest/api/compute/flavors/test_flavors_negative.py index 09f54b5859..efd9cdd8a8 100644 --- a/tempest/api/compute/flavors/test_flavors_negative.py +++ b/tempest/api/compute/flavors/test_flavors_negative.py @@ -47,7 +47,7 @@ class FlavorsV2NegativeTest(base.BaseV2ComputeTest): 'name': data_utils.rand_name( prefix=CONF.resource_name_prefix, name='image'), 'container_format': CONF.image.container_formats[0], - 'disk_format': CONF.image.disk_formats[0], + 'disk_format': 'raw', 'min_ram': min_img_ram, 'visibility': 'private' } diff --git a/tempest/api/image/v2/admin/test_images.py b/tempest/api/image/v2/admin/test_images.py index 2b1c4fb250..2c2e9a8f05 100644 --- a/tempest/api/image/v2/admin/test_images.py +++ b/tempest/api/image/v2/admin/test_images.py @@ -112,7 +112,7 @@ class ImportCopyImagesTest(base.BaseV2ImageAdminTest): image_name = data_utils.rand_name( prefix=CONF.resource_name_prefix, name='copy-image') container_format = CONF.image.container_formats[0] - disk_format = CONF.image.disk_formats[0] + disk_format = 'raw' image = self.create_image(name=image_name, container_format=container_format, disk_format=disk_format, diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py index 5bb8eef062..f6ca3175ec 100644 --- a/tempest/api/image/v2/test_images.py +++ b/tempest/api/image/v2/test_images.py @@ -56,7 +56,14 @@ class ImportImagesTest(base.BaseV2ImageTest): image_name = data_utils.rand_name( prefix=CONF.resource_name_prefix, name='image') container_format = container_format or CONF.image.container_formats[0] - disk_format = disk_format or CONF.image.disk_formats[0] + disk_format = disk_format or 'raw' + if disk_format not in CONF.image.disk_formats: + # If the test asked for some disk format that is not available, + # consider that a programming error. Tests with specific + # requirements should be checking to see if it is available and + # skipping themselves instead of this helper doing it. + raise RuntimeError('Test requires unavailable disk_format %s, ' + 'but did not skip' % disk_format) image = self.create_image(name=image_name, container_format=container_format, disk_format=disk_format, @@ -390,7 +397,7 @@ class BasicOperationsImagesTest(base.BaseV2ImageTest): image_name = data_utils.rand_name( prefix=CONF.resource_name_prefix, name='image') container_format = CONF.image.container_formats[0] - disk_format = CONF.image.disk_formats[0] + disk_format = 'raw' image = self.create_image(name=image_name, container_format=container_format, disk_format=disk_format, @@ -754,7 +761,7 @@ class ListSharedImagesTest(base.BaseV2ImageTest): # Create an image to be shared using default visibility image_file = io.BytesIO(data_utils.random_bytes(2048)) container_format = CONF.image.container_formats[0] - disk_format = CONF.image.disk_formats[0] + disk_format = 'raw' image = self.create_image(container_format=container_format, disk_format=disk_format) self.client.store_image_file(image['id'], data=image_file) diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py index d8480df16d..754b6767b5 100644 --- a/tempest/api/volume/test_volumes_negative.py +++ b/tempest/api/volume/test_volumes_negative.py @@ -45,7 +45,7 @@ class VolumesNegativeTest(base.BaseVolumeTest): image = self.images_client.create_image( name=image_name, container_format=CONF.image.container_formats[0], - disk_format=CONF.image.disk_formats[0], + disk_format='raw', visibility='private', min_disk=CONF.volume.volume_size + CONF.volume.volume_size_extend) self.addCleanup(test_utils.call_and_ignore_notfound_exc,