Skip to content

Commit f6128c6

Browse files
committed
nixos/tests/incus: add AppArmor test
1 parent f4fd5a5 commit f6128c6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

nixos/tests/incus/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,10 @@ in
4646
inherit lts pkgs system;
4747
storageZfs = true;
4848
};
49+
50+
appArmor = incusTest {
51+
inherit lts pkgs system;
52+
appArmor = true;
53+
allTests = true;
54+
};
4955
}

nixos/tests/incus/incus-tests.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import ../make-test-python.nix (
77

88
allTests ? false,
99

10+
appArmor ? false,
1011
featureUser ? allTests,
1112
initLegacy ? true,
1213
initSystemd ? true,
@@ -139,6 +140,9 @@ import ../make-test-python.nix (
139140
networking.hostId = "01234567";
140141
networking.firewall.trustedInterfaces = [ "incusbr0" ];
141142

143+
security.apparmor.enable = appArmor;
144+
services.dbus.apparmor = (if appArmor then "enabled" else "disabled");
145+
142146
services.lvm = {
143147
boot.thin.enable = storageLvm;
144148
dmeventd.enable = storageLvm;

0 commit comments

Comments
 (0)