diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-11-21 01:17:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-11-21 01:17:57 +0000 |
| commit | 4c7bbdae28999f56cc4a076006b4726b43f7eb80 (patch) | |
| tree | e380f4917a8ba4f60fe296075b56df2977e4f795 /functional | |
| parent | 9ee8b4a71d51b4325eb5721034d04ce0cbcb1593 (diff) | |
| parent | c0cc53807754b5957e84d159f70fe42407d77f29 (diff) | |
| download | python-openstackclient-4c7bbdae28999f56cc4a076006b4726b43f7eb80.tar.gz | |
Merge "Have configuration tests support OCC"
Diffstat (limited to 'functional')
| -rw-r--r-- | functional/tests/common/test_configuration.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/functional/tests/common/test_configuration.py b/functional/tests/common/test_configuration.py index f4a02099..801ee10d 100644 --- a/functional/tests/common/test_configuration.py +++ b/functional/tests/common/test_configuration.py @@ -30,9 +30,15 @@ class ConfigurationTests(test.TestCase): def test_configuration_show_unmask(self): raw_output = self.openstack('configuration show --unmask ' + self.opts) - passwd = os.environ['OS_PASSWORD'] - self.assertOutput(passwd + '\n', raw_output) + # If we are using os-client-config, this will not be set. Rather than + # parse clouds.yaml to get the right value, just make sure + # we are not getting redacted. + passwd = os.environ.get('OS_PASSWORD') + if passwd: + self.assertEqual(passwd + '\n', raw_output) + else: + self.assertNotEqual(configuration.REDACTED + '\n', raw_output) def test_configuration_show_mask(self): raw_output = self.openstack('configuration show --mask ' + self.opts) - self.assertOutput(configuration.REDACTED + '\n', raw_output) + self.assertEqual(configuration.REDACTED + '\n', raw_output) |
