Skip to content

Commit

Permalink
Do not use class variable for clients in ContainerSyncTest
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zhufl committed Dec 26, 2017
1 parent db97710 commit bfa4b4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tempest/api/object_storage/test_container_sync.py
Expand Up @@ -33,8 +33,6 @@


class ContainerSyncTest(base.BaseObjectTest):
clients = {}

credentials = [['operator', CONF.object_storage.operator_role],
['operator_alt', CONF.object_storage.operator_role]]

Expand All @@ -54,6 +52,7 @@ def resource_setup(cls):
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'
Expand Down

0 comments on commit bfa4b4e

Please sign in to comment.