Skip to content

Commit 4c7bbda

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Have configuration tests support OCC"
2 parents 9ee8b4a + c0cc538 commit 4c7bbda

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

functional/tests/common/test_configuration.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ def test_configuration_show(self):
3030

3131
def test_configuration_show_unmask(self):
3232
raw_output = self.openstack('configuration show --unmask ' + self.opts)
33-
passwd = os.environ['OS_PASSWORD']
34-
self.assertOutput(passwd + '\n', raw_output)
33+
# If we are using os-client-config, this will not be set. Rather than
34+
# parse clouds.yaml to get the right value, just make sure
35+
# we are not getting redacted.
36+
passwd = os.environ.get('OS_PASSWORD')
37+
if passwd:
38+
self.assertEqual(passwd + '\n', raw_output)
39+
else:
40+
self.assertNotEqual(configuration.REDACTED + '\n', raw_output)
3541

3642
def test_configuration_show_mask(self):
3743
raw_output = self.openstack('configuration show --mask ' + self.opts)
38-
self.assertOutput(configuration.REDACTED + '\n', raw_output)
44+
self.assertEqual(configuration.REDACTED + '\n', raw_output)

0 commit comments

Comments
 (0)