Fix credentials passed to tempest

Tempest auth Manager recently changed to enforce the use of
Credentials objects in its public interface. Change lets tempest
take the CONF.identity defaults and decide how best to authorize.

Change-Id: If116d8cef145c310bd3a7077b3ae9780e705dc89
Closes-Bug: 1317549
This commit is contained in:
Steve McLellan 2014-05-08 17:52:04 -05:00
parent a33bac39bb
commit 92b3d1866f

View File

@ -197,14 +197,10 @@ class TestCase(testtools.TestCase):
def setUpClass(cls): def setUpClass(cls):
super(TestCase, cls).setUpClass() super(TestCase, cls).setUpClass()
username = CONF.identity.username # If no credentials are provided, the Manager will use those
password = CONF.identity.password # in CONF.identity and generate an auth_provider from them
tenant_name = CONF.identity.tenant_name mgr = clients.Manager()
cls.client = MuranoClient(mgr.auth_provider)
mgr = clients.Manager(username, password, tenant_name)
auth_provider = mgr.get_auth_provider(mgr.get_default_credentials())
cls.client = MuranoClient(auth_provider)
def setUp(self): def setUp(self):
super(TestCase, self).setUp() super(TestCase, self).setUp()
@ -255,11 +251,7 @@ class NegativeTestCase(TestCase):
def setUpClass(cls): def setUpClass(cls):
super(NegativeTestCase, cls).setUpClass() super(NegativeTestCase, cls).setUpClass()
username = CONF.identity.alt_username # If no credentials are provided, the Manager will use those
password = CONF.identity.alt_password # in CONF.identity and generate an auth_provider from them
tenant_name = CONF.identity.alt_tenant_name mgr = clients.Manager()
cls.alt_client = MuranoClient(mgr.auth_provider)
mgr = clients.Manager(username, password, tenant_name)
auth_provider = mgr.get_auth_provider(mgr.get_default_credentials())
cls.alt_client = MuranoClient(auth_provider)