diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample index 80c60d5f35..b64b0474e9 100644 --- a/etc/tempest.conf.sample +++ b/etc/tempest.conf.sample @@ -164,6 +164,9 @@ catalog_type = image # The version of the OpenStack Images API to use api_version = 1 +# HTTP image to use for glance http image testing +http_image = http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz + [network] # This section contains configuration options used when executing tests # against the OpenStack Network API. diff --git a/tempest/config.py b/tempest/config.py index e09da2b376..a90767e383 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -243,7 +243,11 @@ ImageGroup = [ help="Version of the API"), cfg.StrOpt('catalog_type', default='image', - help='Catalog type of the Image service.') + help='Catalog type of the Image service.'), + cfg.StrOpt('http_image', + default='http://download.cirros-cloud.net/0.3.1/' + 'cirros-0.3.1-x86_64-uec.tar.gz', + help='http accessable image') ] diff --git a/tempest/tests/image/v1/test_images.py b/tempest/tests/image/v1/test_images.py index c01aeafad5..19c0aa04e5 100644 --- a/tempest/tests/image/v1/test_images.py +++ b/tempest/tests/image/v1/test_images.py @@ -81,32 +81,10 @@ class CreateRegisterImagesTest(base.BaseV1ImageTest): self.assertEqual(properties['key2'], 'value2') def test_register_http_image(self): - container_client = self.os.container_client - object_client = self.os.object_client - container_name = "image_container" - object_name = "test_image.img" - container_client.create_container(container_name) - self.addCleanup(container_client.delete_container, container_name) - cont_headers = {'X-Container-Read': '.r:*'} - resp, _ = container_client.update_container_metadata( - container_name, - metadata=cont_headers, - metadata_prefix='') - self.assertEqual(resp['status'], '204') - - data = "TESTIMAGE" - resp, _ = object_client.create_object(container_name, - object_name, data) - self.addCleanup(object_client.delete_object, container_name, - object_name) - self.assertEqual(resp['status'], '201') - object_url = '/'.join((object_client.base_url, - container_name, - object_name)) resp, body = self.create_image(name='New Http Image', container_format='bare', disk_format='raw', is_public=True, - copy_from=object_url) + copy_from=self.config.images.http_image) self.assertTrue('id' in body) image_id = body.get('id') self.created_images.append(image_id) @@ -115,7 +93,6 @@ class CreateRegisterImagesTest(base.BaseV1ImageTest): self.client.wait_for_image_status(image_id, 'active') resp, body = self.client.get_image(image_id) self.assertEqual(resp['status'], '200') - self.assertEqual(body, data) @attr(type='image') def test_register_image_with_min_ram(self):