tests: Don't use pkgs.extend. OfBorg will reject it.

The good news is that it worked as expected.
This commit is contained in:
Robert Hensing 2018-10-23 17:32:59 +02:00
parent 933c95c0f4
commit 5d594d764e
1 changed files with 3 additions and 13 deletions

View File

@ -8,20 +8,10 @@ lib.optionalAttrs stdenv.hostPlatform.isLinux (
fileSystems."/".device = "/dev/null"; fileSystems."/".device = "/dev/null";
}).toplevel; }).toplevel;
nixosTest-test = let nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: {
# extend pkgs with an extra overlay to make sure pkgs is passed along properly to machines. name = "nixosTest-test";
altPkgs = pkgs.extend (self: super: {
# To test pkgs in machine
hello_s9e8ghsi = self.hello;
# To test lib in test
lib = super.lib // { testSubject_dohra8w = "nixosTest"; };
# To test pkgs in test
dash-test_ny3dseg = "-test";
});
in altPkgs.nixosTest ({ lib, pkgs, ... }: {
name = "${lib.testSubject_dohra8w}${pkgs.dash-test_ny3dseg}"; # These would fail if it's the wrong pkgs or lib
machine = { pkgs, ... }: { machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.hello_s9e8ghsi ]; environment.systemPackages = [ pkgs.hello ];
}; };
testScript = '' testScript = ''
$machine->succeed("hello"); $machine->succeed("hello");