Skip to content

Commit

Permalink
nixosTests.nix-serve: Use new entrypoint
Browse files Browse the repository at this point in the history
This reuses the `pkgs`, so that `pkgs.nixosTests.nix-serve` will
run with the overlays of `pkgs` applied.
  • Loading branch information
roberth committed Sep 18, 2024
1 parent 395c52d commit 30620e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ in {
nix-misc = handleTest ./nix/misc.nix {};
nix-upgrade = handleTest ./nix/upgrade.nix {inherit (pkgs) nixVersions;};
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 {};
nixops = handleTest ./nixops/default.nix {};
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
Expand Down
6 changes: 3 additions & 3 deletions nixos/tests/nix-serve.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, ... }:
{ config, ... }:
{
name = "nix-serve";
nodes.machine = { pkgs, ... }: {
Expand All @@ -9,7 +9,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
};
testScript = let
pkgHash = builtins.head (
builtins.match "${builtins.storeDir}/([^-]+).+" (toString pkgs.hello)
builtins.match "${builtins.storeDir}/([^-]+).+" (toString config.node.pkgs.hello)
);
in ''
start_all()
Expand 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"
)
'';
})
}

0 comments on commit 30620e7

Please sign in to comment.