summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/common
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-08-09 17:29:40 +0000
committerGerrit Code Review <review@openstack.org>2019-08-09 17:29:40 +0000
commit9042668da4fc70d85e60c79986ab46b0ec070a86 (patch)
tree3dee8ea94a547ba505b2f64f96d1f3887d8406ba /openstackclient/tests/functional/common
parent6f60f833e87979a1fca066c352dbaf9bb9fd852d (diff)
parent865e182970c9ce42d5be07cd3b81fb5dd1a3e656 (diff)
downloadpython-openstackclient-9042668da4fc70d85e60c79986ab46b0ec070a86.tar.gz
Merge "Make configuration show not require auth"
Diffstat (limited to 'openstackclient/tests/functional/common')
-rw-r--r--openstackclient/tests/functional/common/test_configuration.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/common/test_configuration.py b/openstackclient/tests/functional/common/test_configuration.py
index 63a17d0e..17e0f45d 100644
--- a/openstackclient/tests/functional/common/test_configuration.py
+++ b/openstackclient/tests/functional/common/test_configuration.py
@@ -37,6 +37,10 @@ class ConfigurationTests(base.TestCase):
configuration.REDACTED,
cmd_output['auth.password']
)
+ self.assertIn(
+ 'auth.password',
+ cmd_output.keys(),
+ )
# Test show --mask
cmd_output = json.loads(self.openstack(
@@ -65,3 +69,26 @@ class ConfigurationTests(base.TestCase):
configuration.REDACTED,
cmd_output['auth.password']
)
+
+
+class ConfigurationTestsNoAuth(base.TestCase):
+ """Functional test for configuration with no auth"""
+
+ def test_configuration_show(self):
+
+ # Test show without option
+ raw_output = self.openstack(
+ 'configuration show',
+ cloud=None,
+ )
+ items = self.parse_listing(raw_output)
+ self.assert_table_structure(items, BASIC_CONFIG_HEADERS)
+
+ cmd_output = json.loads(self.openstack(
+ 'configuration show -f json',
+ cloud=None,
+ ))
+ self.assertNotIn(
+ 'auth.password',
+ cmd_output,
+ )