3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/multipass: init

This commit is contained in:
Jon Seager 2023-02-03 09:28:48 +00:00
parent 63e3f8da09
commit 978259361b
No known key found for this signature in database
GPG key ID: F4A9184451BD9A74
2 changed files with 38 additions and 0 deletions

View file

@ -411,6 +411,7 @@ in {
mpd = handleTest ./mpd.nix {};
mpv = handleTest ./mpv.nix {};
mtp = handleTest ./mtp.nix {};
multipass = handleTest ./multipass.nix {};
mumble = handleTest ./mumble.nix {};
musescore = handleTest ./musescore.nix {};
munin = handleTest ./munin.nix {};

37
nixos/tests/multipass.nix Normal file
View file

@ -0,0 +1,37 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
multipass-image = import ../release.nix {
configuration = {
# Building documentation makes the test unnecessarily take a longer time:
documentation.enable = lib.mkForce false;
};
};
in
{
name = "multipass";
meta.maintainers = [ lib.maintainers.jnsgruk ];
nodes.machine = { lib, ... }: {
virtualisation = {
cores = 1;
memorySize = 1024;
diskSize = 4096;
multipass.enable = true;
};
};
testScript = ''
machine.wait_for_unit("sockets.target")
machine.wait_for_unit("multipass.service")
machine.wait_for_file("/var/lib/multipass/data/multipassd/network/multipass_subnet")
# Wait for Multipass to settle
machine.sleep(1)
machine.succeed("multipass list")
'';
})