Change CLI tests to use auth providers
This commit changes the CLI tests to use the auth providers for
credentials. Previously they were just using the admin credentials
straight from the config file. The typical motivation for doing this
would be tenant isolation for running in parallel, but that doesn't
apply to the CLI tests because they are simple read-only. However, in
the future when test-accounts supports admin credentials doing this
won't be supported.
Change-Id: Iad5fe6e8abe4491d10e9a676a1c2a7da05a38113
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index 2126833..8dd2df2 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -18,6 +18,7 @@
from tempest_lib.cli import base
import testtools
+from tempest.common import credentials
from tempest import config
from tempest import exceptions
from tempest.openstack.common import versionutils
@@ -72,10 +73,12 @@
msg = "cli testing disabled"
raise cls.skipException(msg)
super(ClientTestBase, cls).resource_setup()
+ cls.cred_prov = credentials.get_isolated_credentials(cls.__name__)
+ cls.creds = cls.cred_prov.get_admin_creds()
def _get_clients(self):
- clients = base.CLIClient(CONF.identity.admin_username,
- CONF.identity.admin_password,
- CONF.identity.admin_tenant_name,
+ clients = base.CLIClient(self.creds.username,
+ self.creds.password,
+ self.creds.tenant_name,
CONF.identity.uri, CONF.cli.cli_dir)
return clients