nixos/tests/incus: enable testing both LTS and non-LTS

+2 -1
nixos/tests/all-tests.nix
···
icingaweb2 = handleTest ./icingaweb2.nix {};
iftop = handleTest ./iftop.nix {};
incron = handleTest ./incron.nix {};
-
incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; });
+
incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; inherit (pkgs) incus; });
+
incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; });
influxdb = handleTest ./influxdb.nix {};
influxdb2 = handleTest ./influxdb2.nix {};
initrd-network-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn {};
+5 -2
nixos/tests/incus/container.nix
···
-
import ../make-test-python.nix ({ pkgs, lib, extra ? {}, name ? "incus-container", ... } :
+
import ../make-test-python.nix ({ pkgs, lib, extra ? {}, name ? "incus-container", incus ? pkgs.incus-lts, ... } :
let
releases = import ../../release.nix {
···
memorySize = 1024;
diskSize = 4096;
-
incus.enable = true;
+
incus = {
+
enable = true;
+
package = incus;
+
};
};
networking.nftables.enable = true;
};
+12 -9
nixos/tests/incus/default.nix
···
config ? { },
pkgs ? import ../../.. { inherit system config; },
handleTestOn,
+
incus ? pkgs.incus-lts,
}:
{
container-legacy-init = import ./container.nix {
name = "container-legacy-init";
-
inherit system pkgs;
+
inherit incus system pkgs;
};
container-systemd-init = import ./container.nix {
name = "container-systemd-init";
-
inherit system pkgs;
+
inherit incus system pkgs;
extra = {
boot.initrd.systemd.enable = true;
};
};
-
incusd-options = import ./incusd-options.nix { inherit system pkgs; };
-
lxd-to-incus = import ./lxd-to-incus.nix { inherit system pkgs; };
-
openvswitch = import ./openvswitch.nix { inherit system pkgs; };
-
socket-activated = import ./socket-activated.nix { inherit system pkgs; };
-
storage = import ./storage.nix { inherit system pkgs; };
-
ui = import ./ui.nix { inherit system pkgs; };
-
virtual-machine = handleTestOn [ "x86_64-linux" ] ./virtual-machine.nix { inherit system pkgs; };
+
incusd-options = import ./incusd-options.nix { inherit incus system pkgs; };
+
lxd-to-incus = import ./lxd-to-incus.nix { inherit incus system pkgs; };
+
openvswitch = import ./openvswitch.nix { inherit incus system pkgs; };
+
socket-activated = import ./socket-activated.nix { inherit incus system pkgs; };
+
storage = import ./storage.nix { inherit incus system pkgs; };
+
ui = import ./ui.nix { inherit incus system pkgs; };
+
virtual-machine = handleTestOn [ "x86_64-linux" ] ./virtual-machine.nix {
+
inherit incus system pkgs;
+
};
}
+7 -1
nixos/tests/incus/incusd-options.nix
···
# this is a set of tests for non-default options. typically the default options
# will be handled by the other tests
import ../make-test-python.nix (
-
{ pkgs, lib, ... }:
+
{
+
pkgs,
+
lib,
+
incus ? pkgs.incus-lts,
+
...
+
}:
let
releases = import ../../release.nix {
···
incus = {
enable = true;
+
package = incus;
softDaemonRestart = false;
preseed = {
+10 -2
nixos/tests/incus/lxd-to-incus.nix
···
import ../make-test-python.nix (
-
{ pkgs, lib, ... }:
+
{
+
pkgs,
+
lib,
+
incus ? pkgs.incus-lts,
+
...
+
}:
let
releases = import ../../release.nix { configuration.documentation.enable = lib.mkForce false; };
···
];
};
-
incus.enable = true;
+
incus = {
+
enable = true;
+
package = incus;
+
};
};
networking.nftables.enable = true;
};
+6 -2
nixos/tests/incus/openvswitch.nix
···
-
import ../make-test-python.nix ({ pkgs, lib, ... } :
+
import ../make-test-python.nix ({ pkgs, lib, incus ? pkgs.incus-lts, ... } :
{
name = "incus-openvswitch";
···
nodes.machine = { lib, ... }: {
virtualisation = {
-
incus.enable = true;
+
incus = {
+
enable = true;
+
package = incus;
+
};
+
vswitch.enable = true;
incus.preseed = {
networks = [
+6 -3
nixos/tests/incus/socket-activated.nix
···
-
import ../make-test-python.nix ({ pkgs, lib, ... } :
+
import ../make-test-python.nix ({ pkgs, lib, incus ? pkgs.incus-lts, ... } :
{
name = "incus-socket-activated";
···
nodes.machine = { lib, ... }: {
virtualisation = {
-
incus.enable = true;
-
incus.socketActivation = true;
+
incus = {
+
enable = true;
+
package = incus;
+
socketActivation = true;
+
};
};
networking.nftables.enable = true;
};
+10 -2
nixos/tests/incus/storage.nix
···
import ../make-test-python.nix (
-
{ pkgs, lib, ... }:
+
{
+
pkgs,
+
lib,
+
incus ? pkgs.incus-lts,
+
...
+
}:
{
name = "incus-storage";
···
virtualisation = {
emptyDiskImages = [ 2048 ];
-
incus.enable = true;
+
incus = {
+
enable = true;
+
package = incus;
+
};
};
};
+5 -2
nixos/tests/incus/ui.nix
···
-
import ../make-test-python.nix ({ pkgs, lib, ... }: {
+
import ../make-test-python.nix ({ pkgs, lib, incus ? pkgs.incus-lts, ... }: {
name = "incus-ui";
meta = {
···
nodes.machine = { lib, ... }: {
virtualisation = {
-
incus.enable = true;
+
incus = {
+
enable = true;
+
package = incus;
+
};
incus.ui.enable = true;
};
networking.nftables.enable = true;
+5 -2
nixos/tests/incus/virtual-machine.nix
···
-
import ../make-test-python.nix ({ pkgs, lib, ... }:
+
import ../make-test-python.nix ({ pkgs, lib, incus ? pkgs.incus-lts, ... }:
let
releases = import ../../release.nix {
···
# Provide a TPM to test vTPM support for guests
tpm.enable = true;
-
incus.enable = true;
+
incus = {
+
enable = true;
+
package = incus;
+
};
};
networking.nftables.enable = true;
};
+1 -1
pkgs/by-name/in/incus/generic.nix
···
;
};
-
tests = nixosTests.incus;
+
tests = if lts then nixosTests.incus-lts else nixosTests.incus;
ui = callPackage ./ui.nix { };