Have configuration tests support OCC
Change-Id: Ia8b0e5672e2e6cf6a37582bf231385aafda8836d
This commit is contained in:
parent
3751dbf127
commit
c0cc538077
@ -30,9 +30,15 @@ class ConfigurationTests(test.TestCase):
|
|||||||
|
|
||||||
def test_configuration_show_unmask(self):
|
def test_configuration_show_unmask(self):
|
||||||
raw_output = self.openstack('configuration show --unmask ' + self.opts)
|
raw_output = self.openstack('configuration show --unmask ' + self.opts)
|
||||||
passwd = os.environ['OS_PASSWORD']
|
# If we are using os-client-config, this will not be set. Rather than
|
||||||
self.assertOutput(passwd + '\n', raw_output)
|
# 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):
|
def test_configuration_show_mask(self):
|
||||||
raw_output = self.openstack('configuration show --mask ' + self.opts)
|
raw_output = self.openstack('configuration show --mask ' + self.opts)
|
||||||
self.assertOutput(configuration.REDACTED + '\n', raw_output)
|
self.assertEqual(configuration.REDACTED + '\n', raw_output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user