nixpkgs/nixos/tests/incus/socket-activated.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
688 B
Nix
Raw Normal View History

2023-10-20 04:10:59 +00:00
import ../make-test-python.nix ({ pkgs, lib, ... } :
{
name = "incus-socket-activated";
meta = {
maintainers = lib.teams.lxc.members;
};
2023-10-20 04:10:59 +00:00
nodes.machine = { lib, ... }: {
virtualisation = {
incus.enable = true;
incus.socketActivation = true;
};
networking.nftables.enable = true;
2023-10-20 04:10:59 +00:00
};
testScript = ''
machine.wait_for_unit("incus.socket")
# ensure service is not running by default
machine.fail("systemctl is-active incus.service")
machine.fail("systemctl is-active incus-preseed.service")
2023-10-20 04:10:59 +00:00
# access the socket and ensure the service starts
machine.succeed("incus list")
machine.wait_for_unit("incus.service")
'';
})