File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments