mirror of
https://github.com/NixOS/nix
synced 2025-07-08 11:03:54 +02:00
Test nix copy --substitute-on-destination
It works with both `ssh://` and `ssh-ng://` now since #9600 (and `ssh-ng:// didn't work before that). Also, by making the two tests share code, we nudge ourselves towards making sure there is feature parity.
This commit is contained in:
parent
1b7968ed86
commit
e76df87814
3 changed files with 77 additions and 28 deletions
|
@ -1,18 +1,14 @@
|
|||
source common.sh
|
||||
|
||||
clearStore
|
||||
clearCache
|
||||
source nix-copy-ssh-common.sh "ssh-ng"
|
||||
|
||||
remoteRoot=$TEST_ROOT/store2
|
||||
chmod -R u+w "$remoteRoot" || true
|
||||
rm -rf "$remoteRoot"
|
||||
clearStore
|
||||
clearRemoteStore
|
||||
|
||||
outPath=$(nix-build --no-out-link dependencies.nix)
|
||||
|
||||
nix store info --store "ssh-ng://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot%3fstore=$NIX_STORE_DIR%26real=$remoteRoot$NIX_STORE_DIR"
|
||||
nix store info --store "$remoteStore"
|
||||
|
||||
# Regression test for https://github.com/NixOS/nix/issues/6253
|
||||
nix copy --to "ssh-ng://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot%3fstore=$NIX_STORE_DIR%26real=$remoteRoot$NIX_STORE_DIR" $outPath --no-check-sigs &
|
||||
nix copy --to "ssh-ng://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot%3fstore=$NIX_STORE_DIR%26real=$remoteRoot$NIX_STORE_DIR" $outPath --no-check-sigs
|
||||
|
||||
[ -f $remoteRoot$outPath/foobar ]
|
||||
nix copy --to "$remoteStore" $outPath --no-check-sigs &
|
||||
nix copy --to "$remoteStore" $outPath --no-check-sigs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue