about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-10T15·22+0200
committerGitHub <noreply@github.com>2016-08-10T15·22+0200
commit6601e465675c5927f85e68a78c22f8828ddc3362 (patch)
treeb85e8f8f0257c2415e603eba86448f4ff24c918a /tests
parenta6eed133c5a3602037bc48675ca783185cca5454 (diff)
parent6e51af80231b2a35ba3f5edffa7e235b239955a0 (diff)
Merge pull request #1024 from shlevy/nuke-nix-push
Nuke nix-push.
Diffstat (limited to 'tests')
-rw-r--r--tests/binary-cache.sh6
-rw-r--r--tests/local.mk2
-rw-r--r--tests/nix-channel.sh2
-rw-r--r--tests/nix-push.sh12
-rw-r--r--tests/repair.sh2
5 files changed, 6 insertions, 18 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
index 96cab6ad4269..4ce428f643e5 100644
--- a/tests/binary-cache.sh
+++ b/tests/binary-cache.sh
@@ -6,7 +6,7 @@ clearCache
 # Create the binary cache.
 outPath=$(nix-build dependencies.nix --no-out-link)
 
-nix-push --dest $cacheDir $outPath
+nix copy --recursive --to file://$cacheDir $outPath
 
 
 basicTests() {
@@ -58,7 +58,7 @@ unset _NIX_FORCE_HTTP_BINARY_CACHE_STORE
 # Test whether Nix notices if the NAR doesn't match the hash in the NAR info.
 clearStore
 
-nar=$(ls $cacheDir/*.nar.xz | head -n1)
+nar=$(ls $cacheDir/nar/*.nar.xz | head -n1)
 mv $nar $nar.good
 mkdir -p $TEST_ROOT/empty
 nix-store --dump $TEST_ROOT/empty | xz > $nar
@@ -117,7 +117,7 @@ badKey="$(cat $TEST_ROOT/pk2)"
 res=($(nix-store --generate-binary-cache-key foo.nixos.org-1 $TEST_ROOT/sk3 $TEST_ROOT/pk3))
 otherKey="$(cat $TEST_ROOT/pk3)"
 
-nix-push --dest $cacheDir --key-file $TEST_ROOT/sk1 $outPath
+nix copy --recursive --to file://$cacheDir?secret-key=$TEST_ROOT/sk1 $outPath
 
 
 # Downloading should fail if we don't provide a key.
diff --git a/tests/local.mk b/tests/local.mk
index 3d25327bd590..1e5439f061e2 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -3,7 +3,7 @@ check:
 
 nix_tests = \
   init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \
-  build-hook.sh nix-push.sh gc.sh gc-concurrent.sh \
+  build-hook.sh gc.sh gc-concurrent.sh \
   referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \
   gc-runtime.sh check-refs.sh filter-source.sh \
   remote-store.sh export.sh export-graph.sh \
diff --git a/tests/nix-channel.sh b/tests/nix-channel.sh
index 2ec986dd415b..553ada51d9f7 100644
--- a/tests/nix-channel.sh
+++ b/tests/nix-channel.sh
@@ -15,7 +15,7 @@ nix-channel --remove xyzzy
 # Create a channel.
 rm -rf $TEST_ROOT/foo
 mkdir -p $TEST_ROOT/foo
-nix-push --dest $TEST_ROOT/foo --manifest --bzip2 $(nix-store -r $(nix-instantiate dependencies.nix))
+nix copy --recursive --to file://$TEST_ROOT/foo?compression="bzip2" $(nix-store -r $(nix-instantiate dependencies.nix))
 rm -rf $TEST_ROOT/nixexprs
 mkdir -p $TEST_ROOT/nixexprs
 cp config.nix dependencies.nix dependencies.builder*.sh $TEST_ROOT/nixexprs/
diff --git a/tests/nix-push.sh b/tests/nix-push.sh
deleted file mode 100644
index 8ea59516c62c..000000000000
--- a/tests/nix-push.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-source common.sh
-
-clearStore
-
-drvPath=$(nix-instantiate dependencies.nix)
-outPath=$(nix-store -r $drvPath)
-
-echo "pushing $drvPath"
-
-mkdir -p $TEST_ROOT/cache
-
-nix-push --dest $TEST_ROOT/cache --manifest $drvPath --bzip2
diff --git a/tests/repair.sh b/tests/repair.sh
index 92f2f8fe60a5..782838704da7 100644
--- a/tests/repair.sh
+++ b/tests/repair.sh
@@ -46,7 +46,7 @@ fi
 # --verify can fix it.
 clearCache
 
-nix-push --dest $cacheDir $path
+nix copy --recursive --to file://$cacheDir $path
 
 chmod u+w $path2
 rm -rf $path2