nixos/tests/incus: fix multi-system support

This commit is contained in:
Adam C. Stephens
2024-12-22 19:33:47 -05:00
parent c4719c5990
commit 9e95bbbc34
5 changed files with 23 additions and 16 deletions
+2 -2
View File
@@ -468,8 +468,8 @@ in {
iftop = handleTest ./iftop.nix {};
immich = handleTest ./web-apps/immich.nix {};
incron = handleTest ./incron.nix {};
incus = pkgs.recurseIntoAttrs (handleTest ./incus { lts = false; });
incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { });
incus = pkgs.recurseIntoAttrs (handleTest ./incus { lts = false; inherit system pkgs; });
incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { inherit system pkgs; });
influxdb = handleTest ./influxdb.nix {};
influxdb2 = handleTest ./influxdb2.nix {};
initrd-network-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn {};
+15 -8
View File
@@ -1,4 +1,7 @@
{
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../../.. { inherit system config; },
lts ? true,
...
}:
@@ -7,36 +10,40 @@ let
in
{
all = incusTest {
inherit lts;
inherit lts pkgs system;
allTests = true;
};
container = incusTest {
inherit lts;
inherit lts pkgs system;
instanceContainer = true;
};
lvm = incusTest {
inherit lts;
inherit lts pkgs system;
storageLvm = true;
};
lxd-to-incus = import ./lxd-to-incus.nix { };
lxd-to-incus = import ./lxd-to-incus.nix {
inherit lts pkgs system;
};
openvswitch = incusTest {
inherit lts;
inherit lts pkgs system;
networkOvs = true;
};
ui = import ./ui.nix { };
ui = import ./ui.nix {
inherit lts pkgs system;
};
virtual-machine = incusTest {
inherit lts;
inherit lts pkgs system;
instanceVm = true;
};
zfs = incusTest {
inherit lts;
inherit lts pkgs system;
storageLvm = true;
};
}
+1 -1
View File
@@ -445,7 +445,7 @@ import ../make-test-python.nix (
machine.succeed("incus storage volume show lvm_pool test_fs")
machine.succeed("incus storage volume show lvm_pool test_vol")
machine.succeed("incus create lvm1 --empty --storage zfs_pool")
machine.succeed("incus create lvm1 --empty --storage lvm_pool")
machine.succeed("incus list lvm1")
'';
}
+3 -3
View File
@@ -3,7 +3,7 @@ import ../make-test-python.nix (
{
pkgs,
lib,
incus ? pkgs.incus-lts,
lts ? true,
...
}:
@@ -21,7 +21,7 @@ import ../make-test-python.nix (
};
nodes.machine =
{ lib, ... }:
{ ... }:
{
virtualisation = {
diskSize = 6144;
@@ -72,7 +72,7 @@ import ../make-test-python.nix (
incus = {
enable = true;
package = incus;
package = if lts then pkgs.incus-lts else pkgs.incus;
};
};
networking.nftables.enable = true;
+2 -2
View File
@@ -2,7 +2,7 @@ import ../make-test-python.nix (
{
pkgs,
lib,
incus ? pkgs.incus-lts,
lts ? true,
...
}:
{
@@ -18,7 +18,7 @@ import ../make-test-python.nix (
virtualisation = {
incus = {
enable = true;
package = incus;
package = if lts then pkgs.incus-lts else pkgs.incus;
};
incus.ui.enable = true;
};