Skip to content

Commit

Permalink
Fix tests and add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Mar 23, 2021
1 parent 6972773 commit 9989097
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions changelog/59427.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added "fips_mode" config option to master and minion configs.
Empty file.
Empty file.
8 changes: 0 additions & 8 deletions tests/unit/modules/test_x509.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
from tests.support.mock import MagicMock, patch
from tests.support.unit import TestCase, skipIf

try:
import pytest
except ImportError as import_error:
pytest = None


try:
import M2Crypto # pylint: disable=unused-import

Expand Down Expand Up @@ -97,7 +91,6 @@
}


@skipIf(not bool(pytest), False)
class X509TestCase(TestCase, LoaderModuleMockMixin):
def setup_loader_modules(self):
return {x509: {"__opts__": {"fips_mode": False}}}
Expand Down Expand Up @@ -464,7 +457,6 @@ def test_read_certificate(self):
assert "MD5 Finger Print" in ret


@skipIf(not bool(pytest), False)
class X509FipsTestCase(TestCase, LoaderModuleMockMixin):
def setup_loader_modules(self):
return {x509: {"__opts__": {"fips_mode": True}}}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/states/test_x509.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_private_key_fips_mode(self):
"""
)
fp, name = tempfile.mkstemp()
with salt.utils.files.open(name, "w") as fd:
with salt.utils.files.fopen(name, "w") as fd:
fd.write(test_key)
fd.write(test_cert)
ret = x509.private_key_managed(name)
Expand Down

0 comments on commit 9989097

Please sign in to comment.