2024-05-09 08:03:07 -06:00
|
|
|
import ../make-test-python.nix ({ pkgs, lib, incus ? pkgs.incus-lts, ... } :
|
2023-10-19 22:10:59 -06:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "incus-socket-activated";
|
|
|
|
|
2023-12-02 07:38:44 -07:00
|
|
|
meta = {
|
|
|
|
maintainers = lib.teams.lxc.members;
|
|
|
|
};
|
2023-10-19 22:10:59 -06:00
|
|
|
|
|
|
|
nodes.machine = { lib, ... }: {
|
|
|
|
virtualisation = {
|
2024-05-09 08:03:07 -06:00
|
|
|
incus = {
|
|
|
|
enable = true;
|
|
|
|
package = incus;
|
|
|
|
socketActivation = true;
|
|
|
|
};
|
2023-10-19 22:10:59 -06:00
|
|
|
};
|
2024-03-09 09:21:55 -07:00
|
|
|
networking.nftables.enable = true;
|
2023-10-19 22:10:59 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("incus.socket")
|
|
|
|
|
|
|
|
# ensure service is not running by default
|
|
|
|
machine.fail("systemctl is-active incus.service")
|
2023-10-27 16:05:58 -06:00
|
|
|
machine.fail("systemctl is-active incus-preseed.service")
|
2023-10-19 22:10:59 -06:00
|
|
|
|
|
|
|
# access the socket and ensure the service starts
|
|
|
|
machine.succeed("incus list")
|
|
|
|
machine.wait_for_unit("incus.service")
|
|
|
|
'';
|
|
|
|
})
|