Do not use class variable for clients in ContainerSyncTest

Running tempest.api.object_storage.test_container_sync_middleware.
ContainerSyncMiddlewareTest.test_container_synchronization along with
all other swift testcases will fail with Unauthorized error, but it can
pass when being executed alone.

This is because clients in parent class ContainerSyncTest is a class
variable, which will cause trouble when using dynamic credentials. So
this is to change clients to an instance variable.

Change-Id: I10f04fadae95932258a5df58ef68d80f81075b79
Closes-Bug: #1740075
This commit is contained in:
zhufl 2017-12-26 14:23:32 +08:00
parent db97710c31
commit bfa4b4e778
1 changed files with 1 additions and 2 deletions

View File

@ -33,8 +33,6 @@ CONF = config.CONF
class ContainerSyncTest(base.BaseObjectTest):
clients = {}
credentials = [['operator', CONF.object_storage.operator_role],
['operator_alt', CONF.object_storage.operator_role]]
@ -54,6 +52,7 @@ class ContainerSyncTest(base.BaseObjectTest):
super(ContainerSyncTest, cls).resource_setup()
cls.containers = []
cls.objects = []
cls.clients = {}
# Default container-server config only allows localhost
cls.local_ip = '127.0.0.1'