Skip to content

Commit

Permalink
Merge pull request #11831 from DeterminateSystems/fix-nix-copy-test
Browse files Browse the repository at this point in the history
Fix 'nix copy' VM test
  • Loading branch information
edolstra authored Nov 7, 2024
2 parents fbceb86 + ea6dc8e commit 0ed5af1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/nixos/nix-copy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ in {
{ config, pkgs, ... }:
{ services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
users.users.root.password = "foobar";
users.users.root.hashedPasswordFile = null;
users.users.root.password = "foobar";
virtualisation.writableStore = true;
virtualisation.additionalPaths = [ pkgB pkgC ];
};
Expand All @@ -64,7 +65,7 @@ in {
# Copy the closure of package A from the client to the server using password authentication,
# and check that all prompts are visible
server.fail("nix-store --check-validity ${pkgA}")
client.send_chars("nix copy --to ssh://server ${pkgA} >&2; echo done\n")
client.send_chars("nix copy --to ssh://server ${pkgA} >&2; echo -n do; echo ne\n")
client.wait_for_text("continue connecting")
client.send_chars("yes\n")
client.wait_for_text("Password:")
Expand Down

0 comments on commit 0ed5af1

Please sign in to comment.