Skip to content

Commit d441bda

Browse files
incus: refactor tests and fix VM CSM support (#365778)
2 parents 400e005 + 6cd3dd3 commit d441bda

File tree

14 files changed

+497
-623
lines changed

14 files changed

+497
-623
lines changed

nixos/modules/virtualisation/incus.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ let
108108
name = "OVMF_VARS.4MB.ms.fd";
109109
path = "${pkgs.OVMFFull.fd}/FV/${ovmf-prefix}_VARS.fd";
110110
}
111+
{
112+
name = "seabios.bin";
113+
path = "${pkgs.seabios-qemu}/share/seabios/bios.bin";
114+
}
111115
];
112116

113117
environment = lib.mkMerge [

nixos/tests/all-tests.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ in {
467467
iftop = handleTest ./iftop.nix {};
468468
immich = handleTest ./web-apps/immich.nix {};
469469
incron = handleTest ./incron.nix {};
470-
incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; inherit (pkgs) incus; });
471-
incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; });
470+
incus = pkgs.recurseIntoAttrs (handleTest ./incus { lts = false; });
471+
incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { });
472472
influxdb = handleTest ./influxdb.nix {};
473473
influxdb2 = handleTest ./influxdb2.nix {};
474474
initrd-network-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn {};

nixos/tests/incus/container.nix

Lines changed: 0 additions & 154 deletions
This file was deleted.

nixos/tests/incus/default.nix

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
11
{
2-
system ? builtins.currentSystem,
3-
config ? { },
4-
pkgs ? import ../../.. { inherit system config; },
5-
handleTestOn,
6-
incus ? pkgs.incus-lts,
2+
lts ? true,
3+
...
74
}:
5+
let
6+
incusTest = import ./incus-tests.nix;
7+
in
88
{
9-
container-legacy-init = import ./container.nix {
10-
name = "container-legacy-init";
11-
inherit incus system pkgs;
9+
all = incusTest {
10+
inherit lts;
11+
allTests = true;
1212
};
13-
container-systemd-init = import ./container.nix {
14-
name = "container-systemd-init";
15-
inherit incus system pkgs;
16-
extra = {
17-
boot.initrd.systemd.enable = true;
18-
};
13+
14+
container = incusTest {
15+
inherit lts;
16+
instanceContainer = true;
1917
};
20-
incusd-options = import ./incusd-options.nix { inherit incus system pkgs; };
21-
lxd-to-incus = import ./lxd-to-incus.nix { inherit incus system pkgs; };
22-
openvswitch = import ./openvswitch.nix { inherit incus system pkgs; };
23-
socket-activated = import ./socket-activated.nix { inherit incus system pkgs; };
24-
storage = import ./storage.nix { inherit incus system pkgs; };
25-
ui = import ./ui.nix { inherit incus system pkgs; };
26-
virtual-machine = handleTestOn [ "x86_64-linux" ] ./virtual-machine.nix {
27-
inherit incus system pkgs;
18+
19+
lvm = incusTest {
20+
inherit lts;
21+
storageLvm = true;
22+
};
23+
24+
lxd-to-incus = import ./lxd-to-incus.nix { };
25+
26+
openvswitch = incusTest {
27+
inherit lts;
28+
networkOvs = true;
29+
};
30+
31+
ui = import ./ui.nix { };
32+
33+
virtual-machine = incusTest {
34+
inherit lts;
35+
instanceVm = true;
36+
};
37+
38+
zfs = incusTest {
39+
inherit lts;
40+
storageLvm = true;
2841
};
2942
}

0 commit comments

Comments
 (0)