Pass resource_name_prefix from tests
The resource_name_prefix was introduced by [1] and in order
to allow users to fully customize the prefix of all resources
created by tempest, it needs to be used in tests.
[1] https://review.opendev.org/c/openstack/tempest/+/897231
Change-Id: I1e23d7a276b32e236fc8897d265c037773eca79d
diff --git a/tempest/api/image/v2/admin/test_images.py b/tempest/api/image/v2/admin/test_images.py
index ce50c5d..27cdcd8 100644
--- a/tempest/api/image/v2/admin/test_images.py
+++ b/tempest/api/image/v2/admin/test_images.py
@@ -63,7 +63,9 @@
@decorators.idempotent_id('f6ab4aa0-035e-4664-9f2d-c57c6df50605')
def test_list_public_image(self):
"""Test create image as admin and list public image as none admin"""
- name = data_utils.rand_name(self.__class__.__name__ + '-Image')
+ name = data_utils.rand_name(
+ prefix=CONF.resource_name_prefix,
+ name=self.__class__.__name__ + '-Image')
image = self.admin_client.create_image(
name=name,
container_format='bare',
@@ -107,7 +109,8 @@
raise self.skipException('Either copy-image import method or '
'multistore is not available')
uuid = data_utils.rand_uuid()
- image_name = data_utils.rand_name('copy-image')
+ 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]
image = self.create_image(name=image_name,