Skip to content

Commit c0cc538

Browse files
TerryHoweDean Troyer
authored andcommitted
Have configuration tests support OCC
Change-Id: Ia8b0e5672e2e6cf6a37582bf231385aafda8836d
1 parent 3751dbf commit c0cc538

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)