X-Git-Url: http://git.scottworley.com/nixos-qemu-vm-isolation/blobdiff_plain/e143026408c2c00b96f43a47af0dcda3182835e4..26efd1b62cf514c1b90d0be0b9aab4345e8b0c21:/checks/mount-grep.nix diff --git a/checks/mount-grep.nix b/checks/mount-grep.nix index 5be45d7..33478ea 100644 --- a/checks/mount-grep.nix +++ b/checks/mount-grep.nix @@ -1,20 +1,33 @@ -{ pkgs, ... }: { +pkgs: { name = "qemu-private-store-mount-grep"; + hostPkgs = pkgs; + + includeTestScriptReferences = false; + nodes = { shared = _: { }; private = _: { imports = [ ../modules/qemu-vm-isolation.nix ]; }; + useNixStoreImage = { + virtualisation = { + sharedDirectories = pkgs.lib.mkForce { }; + useNixStoreImage = true; + }; + }; }; testScript = '' start_all() shared.wait_for_unit("multi-user.target") private.wait_for_unit("multi-user.target") + useNixStoreImage.wait_for_unit("multi-user.target") shared.succeed("[[ $(mount | grep -c virt) -gt 0 ]]") private.succeed("[[ $(mount | grep -c virt) -eq 0 ]]") + useNixStoreImage.succeed("[[ $(mount | grep -c virt) -eq 0 ]]") shared.succeed("[[ -e ${pkgs.pv} ]]") private.fail("[[ -e ${pkgs.pv} ]]") + useNixStoreImage.fail("[[ -e ${pkgs.pv} ]]") ''; }