CI: Test SELinux configuration
Change-Id: I06b0bd4634ebb8b78baa23656c891333fd96b88b
This commit is contained in:
parent
351e6b3173
commit
8da3481ca2
@ -319,6 +319,19 @@ def test_firewalld_rules(host):
|
||||
assert expected_line in perm_info
|
||||
|
||||
|
||||
@pytest.mark.skipif(not _is_dnf(),
|
||||
reason="SELinux only supported on CentOS/Rocky")
|
||||
def test_selinux(host):
|
||||
selinux = host.check_output("sestatus")
|
||||
selinux = selinux.splitlines()
|
||||
# Remove duplicate whitespace characters in output
|
||||
selinux = [" ".join(x.split()) for x in selinux]
|
||||
|
||||
assert "SELinux status: enabled" in selinux
|
||||
assert "Current mode: permissive" in selinux
|
||||
assert "Mode from config file: permissive" in selinux
|
||||
|
||||
|
||||
def test_swap(host):
|
||||
swapon = host.check_output("swapon -s")
|
||||
swapon = swapon.splitlines()
|
||||
|
Loading…
Reference in New Issue
Block a user