diff options
| author | Zuul <zuul@review.opendev.org> | 2019-08-09 17:29:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2019-08-09 17:29:40 +0000 |
| commit | 9042668da4fc70d85e60c79986ab46b0ec070a86 (patch) | |
| tree | 3dee8ea94a547ba505b2f64f96d1f3887d8406ba /openstackclient/tests/functional/base.py | |
| parent | 6f60f833e87979a1fca066c352dbaf9bb9fd852d (diff) | |
| parent | 865e182970c9ce42d5be07cd3b81fb5dd1a3e656 (diff) | |
| download | python-openstackclient-9042668da4fc70d85e60c79986ab46b0ec070a86.tar.gz | |
Merge "Make configuration show not require auth"
Diffstat (limited to 'openstackclient/tests/functional/base.py')
| -rw-r--r-- | openstackclient/tests/functional/base.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/openstackclient/tests/functional/base.py b/openstackclient/tests/functional/base.py index 1414e6bb..c34ca393 100644 --- a/openstackclient/tests/functional/base.py +++ b/openstackclient/tests/functional/base.py @@ -45,9 +45,17 @@ class TestCase(testtools.TestCase): @classmethod def openstack(cls, cmd, cloud=ADMIN_CLOUD, fail_ok=False): """Executes openstackclient command for the given action.""" - return execute( - 'openstack --os-cloud={cloud} '.format(cloud=cloud) + - cmd, fail_ok=fail_ok) + if cloud is not None: + return execute( + 'openstack --os-cloud={cloud} '.format(cloud=cloud) + cmd, + fail_ok=fail_ok + ) + else: + # Execute command with no auth + return execute( + 'openstack --os-auth-type none ' + cmd, + fail_ok=fail_ok + ) @classmethod def is_service_enabled(cls, service): |
