diff options
author | Mike Milner <mike.milner@canonical.com> | 2012-02-24 15:16:56 -0400 |
---|---|---|
committer | Mike Milner <mike.milner@canonical.com> | 2012-02-24 15:16:56 -0400 |
commit | 9f719a8c427f639e1f0ea6725073be3081dd008e (patch) | |
tree | c3a29b5750fb305dea4b5b6e370b1d52446e97a6 /tests | |
parent | 2465470c9133041a3b7f5963c579a0f680390ffb (diff) | |
download | vyos-cloud-init-9f719a8c427f639e1f0ea6725073be3081dd008e.tar.gz vyos-cloud-init-9f719a8c427f639e1f0ea6725073be3081dd008e.zip |
If we don't trust the default certs, don't add new certs from
ca-certificates package upgrades.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_handler_ca_certs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/test_handler_ca_certs.py b/tests/unittests/test_handler_ca_certs.py index d6513b5b..37bd7a08 100644 --- a/tests/unittests/test_handler_ca_certs.py +++ b/tests/unittests/test_handler_ca_certs.py @@ -169,10 +169,15 @@ class TestRemoveDefaultCaCerts(MockerTestCase): mock_delete_dir_contents = self.mocker.replace(delete_dir_contents, passthrough=False) mock_write = self.mocker.replace(write_file, passthrough=False) + mock_check_call = self.mocker.replace("subprocess.check_call", + passthrough=False) mock_delete_dir_contents("/usr/share/ca-certificates/") mock_delete_dir_contents("/etc/ssl/certs/") mock_write("/etc/ca-certificates.conf", "", mode=0644) + mock_check_call([ + "echo 'ca-certificates ca-certificates/trust_new_crts select no'" + " | debconf-set-selections"], shell=True) self.mocker.replay() remove_default_ca_certs() |