diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2020-02-10 10:17:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 11:17:56 -0500 |
commit | 81c7477a55b509a33af38bc502b1e9dd4ea643ff (patch) | |
tree | 8fea1f7fdaa3475b44e6a5b738b6e2fc69590f7a /cloudinit/config/tests | |
parent | 890aca4777ab61e54b6b96d251c3022cbe0b108c (diff) | |
download | vyos-cloud-init-81c7477a55b509a33af38bc502b1e9dd4ea643ff.tar.gz vyos-cloud-init-81c7477a55b509a33af38bc502b1e9dd4ea643ff.zip |
unittest: fix stderr leak in cc_set_password random unittest output. (#208)
Diffstat (limited to 'cloudinit/config/tests')
-rw-r--r-- | cloudinit/config/tests/test_set_passwords.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/tests/test_set_passwords.py b/cloudinit/config/tests/test_set_passwords.py index 3b5cdd06..8247c388 100644 --- a/cloudinit/config/tests/test_set_passwords.py +++ b/cloudinit/config/tests/test_set_passwords.py @@ -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') |