mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixosTests.nix-serve: Use new entrypoint
This reuses the `pkgs`, so that `pkgs.nixosTests.nix-serve` will run with the overlays of `pkgs` applied.
This commit is contained in:
parent
395c52d142
commit
30620e7736
@ -685,7 +685,7 @@ in {
|
|||||||
nix-misc = handleTest ./nix/misc.nix {};
|
nix-misc = handleTest ./nix/misc.nix {};
|
||||||
nix-upgrade = handleTest ./nix/upgrade.nix {inherit (pkgs) nixVersions;};
|
nix-upgrade = handleTest ./nix/upgrade.nix {inherit (pkgs) nixVersions;};
|
||||||
nix-required-mounts = runTest ./nix-required-mounts;
|
nix-required-mounts = runTest ./nix-required-mounts;
|
||||||
nix-serve = handleTest ./nix-serve.nix {};
|
nix-serve = runTest ./nix-serve.nix;
|
||||||
nix-serve-ssh = handleTest ./nix-serve-ssh.nix {};
|
nix-serve-ssh = handleTest ./nix-serve-ssh.nix {};
|
||||||
nixops = handleTest ./nixops/default.nix {};
|
nixops = handleTest ./nixops/default.nix {};
|
||||||
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
|
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
name = "nix-serve";
|
name = "nix-serve";
|
||||||
nodes.machine = { pkgs, ... }: {
|
nodes.machine = { pkgs, ... }: {
|
||||||
@ -9,7 +9,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||||||
};
|
};
|
||||||
testScript = let
|
testScript = let
|
||||||
pkgHash = builtins.head (
|
pkgHash = builtins.head (
|
||||||
builtins.match "${builtins.storeDir}/([^-]+).+" (toString pkgs.hello)
|
builtins.match "${builtins.storeDir}/([^-]+).+" (toString config.node.pkgs.hello)
|
||||||
);
|
);
|
||||||
in ''
|
in ''
|
||||||
start_all()
|
start_all()
|
||||||
@ -19,4 +19,4 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||||||
"curl --fail -g http://0.0.0.0:5000/nar/${pkgHash}.nar -o /tmp/hello.nar"
|
"curl --fail -g http://0.0.0.0:5000/nar/${pkgHash}.nar -o /tmp/hello.nar"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
})
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user