tests.nixos-functions.nixosTest-test: Test callPackage-like behavior

This commit is contained in:
Robert Hensing 2022-03-21 23:10:42 +01:00
parent db6e76f524
commit b2d3baa3cf

View file

@ -26,14 +26,14 @@ in lib.optionalAttrs stdenv.hostPlatform.isLinux (
fileSystems."/".device = "/dev/null";
}).toplevel;
nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: {
nixosTest-test = pkgs.nixosTest ({ lib, pkgs, figlet, ... }: {
name = "nixosTest-test";
machine = { pkgs, ... }: {
system.nixos = dummyVersioning;
environment.systemPackages = [ pkgs.hello ];
environment.systemPackages = [ pkgs.hello figlet ];
};
testScript = ''
machine.succeed("hello")
machine.succeed("hello | figlet >/dev/console")
'';
});