Skip to content

Commit

Permalink
unittest: fix stderr leak in cc_set_password random unittest output. (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
raharper authored Feb 10, 2020
1 parent 890aca4 commit 81c7477
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloudinit/config/tests/test_set_passwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ class TestSetPasswordsHandle(CiTestCase):

with_logs = True

def setUp(self):
super(TestSetPasswordsHandle, self).setUp()
self.add_patch('cloudinit.config.cc_set_passwords.sys.stderr', 'm_err')

def test_handle_on_empty_config(self, *args):
"""handle logs that no password has changed when config is empty."""
cloud = self.tmp_cloud(distro='ubuntu')
Expand Down

0 comments on commit 81c7477

Please sign in to comment.