Skip to content

Commit

Permalink
nixos/tests/incus: add AppArmor test
Browse files Browse the repository at this point in the history
Currently limit the test scope to instanceContainer since there is a known issue.
allTests might cause too many false positives.

initLegacy is also disabled to reduce test size.
  • Loading branch information
MakiseKurisu committed Mar 11, 2025
1 parent 980e536 commit ba91cb1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nixos/tests/incus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ in
inherit lts pkgs system;
storageZfs = true;
};

appArmor = incusTest {
inherit lts pkgs system;
appArmor = true;
initLegacy = false;
instanceContainer = true;
};
}
4 changes: 4 additions & 0 deletions nixos/tests/incus/incus-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ../make-test-python.nix (

allTests ? false,

appArmor ? false,
featureUser ? allTests,
initLegacy ? true,
initSystemd ? true,
Expand Down Expand Up @@ -139,6 +140,9 @@ import ../make-test-python.nix (
networking.hostId = "01234567";
networking.firewall.trustedInterfaces = [ "incusbr0" ];

security.apparmor.enable = appArmor;
services.dbus.apparmor = (if appArmor then "enabled" else "disabled");

services.lvm = {
boot.thin.enable = storageLvm;
dmeventd.enable = storageLvm;
Expand Down

0 comments on commit ba91cb1

Please sign in to comment.