Fix grains test on FIPS platforms

Also, clean up pre-commit
This commit is contained in:
Daniel A. Wozniak 2024-08-17 14:39:54 -07:00
parent a87f2418aa
commit 17c58d6587
2 changed files with 8 additions and 1 deletions

View file

@ -270,7 +270,9 @@ def test_pkg_003_installed_multipkg(caplog, PKG_TARGETS, modules, states, grains
@pytest.mark.usefixtures("VERSION_SPEC_SUPPORTED")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_004_installed_multipkg_with_version(PKG_TARGETS, latest_version, states, grains):
def test_pkg_004_installed_multipkg_with_version(
PKG_TARGETS, latest_version, states, grains
):
"""
This is a destructive test as it installs and then removes two packages
"""

View file

@ -1,5 +1,7 @@
import pytest
from tests.conftest import FIPS_TESTRUN
def test_grains_overwrite(salt_cli, salt_master, salt_minion):
assert not salt_minion.config.get("grains_deep_merge", False)
@ -18,6 +20,9 @@ def test_grains_merge(salt_cli, salt_master):
"grains_deep_merge": True,
# Grains in the minon config won't get merged.
# "grains": {"a_custom": {"k1": "v1"}},
"fips_mode": FIPS_TESTRUN,
"encryption_algorithm": "OAEP-SHA224" if FIPS_TESTRUN else "OAEP-SHA1",
"signing_algorithm": "PKCS1v15-SHA224" if FIPS_TESTRUN else "PKCS1v15-SHA1",
},
)
minion.after_terminate(