Skip to content

nixosTests.nix-ssh-serve: port to python#73994

Merged
globin merged 1 commit intoNixOS:masterfrom
flokli:nixos-test-port-nix-ssh-serve
Nov 24, 2019
Merged

nixosTests.nix-ssh-serve: port to python#73994
globin merged 1 commit intoNixOS:masterfrom
flokli:nixos-test-port-nix-ssh-serve

Conversation

@flokli
Copy link
Copy Markdown
Member

@flokli flokli commented Nov 23, 2019

Motivation for this change

#72828

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@flokli flokli force-pushed the nixos-test-port-nix-ssh-serve branch from a608956 to ba77344 Compare November 23, 2019 23:15
@flokli flokli changed the title Nixos test port nix ssh serve nixosTests.nix-ssh-serve: port to python Nov 23, 2019
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 23, 2019
Comment on lines +23 to +30
client.succeed("mkdir -m 700 /root/.ssh")
client.succeed(
"cat ${ssh-config} > /root/.ssh/config"
)
client.succeed(
"cat ${snakeOilPrivateKey} > /root/.ssh/id_ecdsa"
)
client.succeed("chmod 600 /root/.ssh/id_ecdsa")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to do simple file operations on the node in the test driver with just python?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There'll be #22401 soon to copy things generated in the VM to $out, but I don't think we can solve this one here much better currently.

We could indirect via a file in the nix store, and cp the store path, because it's also in the VM.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There'll be #22401 soon to copy things generated in the VM to $out, but I don't think we can solve this one here much better currently.

We could indirect via a file in the nix store, and cp the store path, because it's also in the VM.

Copy link
Copy Markdown
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Succeeds for me on NixOS x86_64-linux.

@worldofpeace
Copy link
Copy Markdown
Contributor

@GrahamcOfBorg test nix-ssh-serve

@globin globin merged commit a9ef2de into NixOS:master Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants