diff options
author | Linda Wang <wangwulin@huawei.com> | 2018-01-29 07:37:37 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2018-02-01 14:38:16 +0000 |
commit | 1825aa713952288e4204ea3b38f0d3c0635a6918 (patch) | |
tree | 1f5174de93defbf8e703c73785eaaa118f4a940e /functest/ci/run_tests.py | |
parent | 416461c30d5a9a0df38e6c1bdef7061fce2c7eaf (diff) |
Rename a common credential file for OS and K8S
Change-Id: Ib8d24be4b29ab1de00d5dd5e3442146b2437cb94
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/ci/run_tests.py')
-rw-r--r-- | functest/ci/run_tests.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 7cba0efb..feef7d6a 100644 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -99,16 +99,6 @@ class Runner(object): pkg_resources.resource_filename('functest', 'ci/testcases.yaml')) @staticmethod - def source_rc_file(): - """Set the environmental vars from openstack.creds""" - - rc_file = CONST.__getattribute__('openstack_creds') - if not os.path.isfile(rc_file): - raise Exception("RC file %s does not exist..." % rc_file) - LOGGER.debug("Sourcing the OpenStack RC file...") - os_utils.source_credentials(rc_file) - - @staticmethod def get_run_dict(testname): """Obtain the 'run' block of the testcase from testcases.yaml""" try: @@ -211,7 +201,9 @@ class Runner(object): self.report_flag = kwargs['report'] try: if 'test' in kwargs: - self.source_rc_file() + LOGGER.debug("Sourcing the credential file...") + os_utils.source_credentials(CONST.__getattribute__('env_file')) + LOGGER.debug("Test args: %s", kwargs['test']) if self.tiers.get_tier(kwargs['test']): self.run_tier(self.tiers.get_tier(kwargs['test'])) |