Skip to content

Commit

Permalink
t: 01_version_utils: add test cases for SELinux defaults in SLES 16 a…
Browse files Browse the repository at this point in the history
…nd lower

Signed-off-by: Eugenio Paolantonio <[email protected]>
  • Loading branch information
g7 committed Dec 30, 2024
1 parent 464f97b commit c8b4653
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions t/01_version_utils.t
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ subtest 'has_selinux_by_default' => sub {
set_var('VERSION', '5.4');
ok has_selinux_by_default, "check has_selinux_by_default for sle-micro 5.4";

# Test SLE < 16 (SELinux not enabled by default)
set_var('DISTRI', 'sle');
set_var('VERSION', '15-SP6');
ok !has_selinux_by_default, "check !has_selinux_by_default for sle 15-SP6";

# Test SLES 16 (SELinux enabled by default)
set_var('VERSION', '16.0');
ok has_selinux_by_default, "check has_selinux_by_default for sle 16.0";

# Test Tumbleweed (SELinux enabled by default only in Staging:D)
set_var('DISTRI', 'opensuse');
set_var('VERSION', 'Tumbleweed');
Expand All @@ -159,6 +168,15 @@ subtest 'has_selinux' => sub {
set_var('VERSION', '5.3');
ok !has_selinux, "check !has_selinux with default settings (sle-micro 5.3)";

# Test SLE < 16 (not enabled by default)
set_var('DISTRI', 'sle');
set_var('VERSION', '15-SP6');
ok !has_selinux, "check !has_selinux with default settings (sle 15-SP6)";

# Test SLES 16 (enabled by default)
set_var('VERSION', '16.0');
ok has_selinux, "check !has_selinux with default settings (sle 16.0)";

# Test Tumbleweed (default enabled in Staging:D)
set_var('DISTRI', 'opensuse');
set_var('VERSION', 'Tumbleweed');
Expand Down

0 comments on commit c8b4653

Please sign in to comment.