]> git.scottworley.com Git - nixos-qemu-vm-isolation/blob - checks/mount-grep.nix
5be45d722a839cbdad1e74196e41fa3bf8ceb317
[nixos-qemu-vm-isolation] / checks / mount-grep.nix
1 { pkgs, ... }: {
2 name = "qemu-private-store-mount-grep";
3
4 nodes = {
5 shared = _: { };
6 private = _: { imports = [ ../modules/qemu-vm-isolation.nix ]; };
7 };
8
9 testScript = ''
10 start_all()
11 shared.wait_for_unit("multi-user.target")
12 private.wait_for_unit("multi-user.target")
13
14 shared.succeed("[[ $(mount | grep -c virt) -gt 0 ]]")
15 private.succeed("[[ $(mount | grep -c virt) -eq 0 ]]")
16
17 shared.succeed("[[ -e ${pkgs.pv} ]]")
18 private.fail("[[ -e ${pkgs.pv} ]]")
19 '';
20 }