Add resources_prefix to rand_name when created
Tests that use rand_name from tempest.lib.common.data_utils are not adding the resources_prefix from the tempest config file when creating resources. These tests should be using tempest.common.data_utils which passes in the resources_prefix as a parameter in the rand_name function call. When resources_prefix is set in the tempest config file all of the resources created should begin with this attribute. For some tests this attribute is not passed to the rand_name function call. This addresses that issue. Change-Id: I662aad1916949750581e793981988edf1560ea94 Closes-Bug: #1628016
This commit is contained in:
parent
2d5bdd04a2
commit
024469732e
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
from tempest.api.identity import base
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest.lib import decorators
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest import test
|
||||
|
|
|
@ -17,8 +17,8 @@ import six
|
|||
import testtools
|
||||
|
||||
from tempest.api.image import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.lib import decorators
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
import time
|
||||
|
||||
from tempest.common import custom_matchers
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.lib.common.utils import test_utils
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
import tempest.test
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
from tempest.api.object_storage import base
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest.lib import decorators
|
||||
from tempest import test
|
||||
|
||||
|
@ -166,7 +166,7 @@ class ContainerTest(base.BaseObjectTest):
|
|||
container_name = self.create_container()
|
||||
object_name, _ = self.create_object(container_name)
|
||||
|
||||
params = {'end_marker': 'ZzzzObject1234567890'}
|
||||
params = {'end_marker': object_name + 'zzzz'}
|
||||
resp, object_list = self.container_client.list_container_contents(
|
||||
container_name,
|
||||
params=params)
|
||||
|
@ -246,7 +246,8 @@ class ContainerTest(base.BaseObjectTest):
|
|||
def test_list_container_contents_with_path(self):
|
||||
# get container contents list using path param
|
||||
container_name = self.create_container()
|
||||
object_name = data_utils.rand_name(name='Swift/TestObject')
|
||||
object_name = data_utils.rand_name(name='TestObject')
|
||||
object_name = 'Swift/' + object_name
|
||||
self.create_object(container_name, object_name)
|
||||
|
||||
params = {'path': 'Swift'}
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
import testtools
|
||||
|
||||
from tempest.api.object_storage import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.lib import decorators
|
||||
from tempest.lib import exceptions
|
||||
from tempest import test
|
||||
|
|
|
@ -17,10 +17,10 @@ from oslo_log import log as logging
|
|||
from oslo_utils import excutils
|
||||
|
||||
from tempest.common import fixed_network
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest.common import waiters
|
||||
from tempest import config
|
||||
from tempest.lib.common import rest_client
|
||||
from tempest.lib.common.utils import data_utils
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
|
Loading…
Reference in New Issue