diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2019-07-26 16:41:04 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2019-08-01 14:53:02 -0500 |
| commit | 865e182970c9ce42d5be07cd3b81fb5dd1a3e656 (patch) | |
| tree | 7465ddd3b1837d8e597c20033f2be478a56d9bc4 /openstackclient/tests/functional/common | |
| parent | c4743199096e77bdc89423dc37f632ac24acdba1 (diff) | |
| download | python-openstackclient-865e182970c9ce42d5be07cd3b81fb5dd1a3e656.tar.gz | |
Make configuration show not require auth
The configuration show should not require auth to just display the
OSC config object. Changes to make it not require auth have
knock-on effects of needing to change a bunch of tests that use it
assuming it _does_ require auth so change those to use 'extension list'
instead.
This sets up further testing of the command line options for changes
in behaviour when we switch to straight SDK usage for configuration.
Change-Id: I6c52485341214ba401064c0f2d1e2b95fdc225c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Diffstat (limited to 'openstackclient/tests/functional/common')
| -rw-r--r-- | openstackclient/tests/functional/common/test_configuration.py | 27 |
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, + ) |
