mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
tests.testers.nixosTest-example: move from tests.nixos-functions.nixosTest-test
And improve the test a bit, to assert correct wiring of `pkgs`.
This commit is contained in:
parent
ae172a2bb4
commit
93abb7bef7
4 changed files with 37 additions and 11 deletions
|
|
@ -26,16 +26,5 @@ in lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
|||
fileSystems."/".device = "/dev/null";
|
||||
}).toplevel;
|
||||
|
||||
nixosTest-test = pkgs.testers.nixosTest ({ lib, pkgs, figlet, ... }: {
|
||||
name = "nixosTest-test";
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
system.nixos = dummyVersioning;
|
||||
environment.systemPackages = [ pkgs.hello figlet ];
|
||||
};
|
||||
testScript = ''
|
||||
machine.succeed("hello | figlet >/dev/console")
|
||||
'';
|
||||
});
|
||||
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue