Created
August 4, 2020 19:24
-
-
Save jasperla/1f40265b54c636602bb439d1b6085709 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/unit/modules/test_tls.py b/tests/unit/modules/test_tls.py | |
index 419cddd056..614963ccfb 100644 | |
--- a/tests/unit/modules/test_tls.py | |
+++ b/tests/unit/modules/test_tls.py | |
@@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals | |
# Import Python libs | |
import logging | |
+import os | |
# Import 3rd party Libs | |
import salt.ext as six | |
@@ -331,6 +332,8 @@ class TLSAddTestCase(TestCase, LoaderModuleMockMixin): | |
tls.__opts__, {"hash_type": "sha256", "cachedir": ca_path} | |
), patch( | |
"salt.modules.tls.maybe_fix_ssl_version", MagicMock(return_value=True) | |
+ ), patch( | |
+ "os.stat", MagicMock(return_value=[MagicMock(st_mode=33188)]) | |
): | |
self.assertEqual( | |
tls.create_ca( | |
@@ -338,6 +341,7 @@ class TLSAddTestCase(TestCase, LoaderModuleMockMixin): | |
), | |
ret, | |
) | |
+ self.assertEqual(certk_stat.st_mode & stat.S_IRWXO, 0) | |
@with_tempdir() | |
def test_recreate_ca(self, ca_path): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment