aboutsummaryrefslogtreecommitdiff
path: root/tests/binary-cache.sh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-01-15 02:01:24 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-01-15 02:01:24 +0000
commit0027b05a15e5845c5ce70c86b5b1a34e7caff039 (patch)
tree9264ad326d070ec2dcf5d19a373721672eb1df2e /tests/binary-cache.sh
parentfed123724679de89d3f56a4c01b5c4c96f93e584 (diff)
parent7a472a76d4dcbbd0eb7832c0bdcb120d32881e8b (diff)
Merge remote-tracking branch 'upstream/master' into non-local-store-build
Diffstat (limited to 'tests/binary-cache.sh')
-rw-r--r--tests/binary-cache.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
index 8f1c6f14d..6697ce236 100644
--- a/tests/binary-cache.sh
+++ b/tests/binary-cache.sh
@@ -130,20 +130,18 @@ grep -q "copying path.*input-0" $TEST_ROOT/log
grep -q "copying path.*top" $TEST_ROOT/log
-if [ -n "$HAVE_SODIUM" ]; then
-
# Create a signed binary cache.
clearCache
clearCacheCache
-declare -a res=($(nix-store --generate-binary-cache-key test.nixos.org-1 $TEST_ROOT/sk1 $TEST_ROOT/pk1 ))
-publicKey="$(cat $TEST_ROOT/pk1)"
+nix key generate-secret --key-name test.nixos.org-1 > $TEST_ROOT/sk1
+publicKey=$(nix key convert-secret-to-public < $TEST_ROOT/sk1)
-res=($(nix-store --generate-binary-cache-key test.nixos.org-1 $TEST_ROOT/sk2 $TEST_ROOT/pk2))
-badKey="$(cat $TEST_ROOT/pk2)"
+nix key generate-secret --key-name test.nixos.org-1 > $TEST_ROOT/sk2
+badKey=$(nix key convert-secret-to-public < $TEST_ROOT/sk2)
-res=($(nix-store --generate-binary-cache-key foo.nixos.org-1 $TEST_ROOT/sk3 $TEST_ROOT/pk3))
-otherKey="$(cat $TEST_ROOT/pk3)"
+nix key generate-secret --key-name foo.nixos.org-1 > $TEST_ROOT/sk3
+otherKey=$(nix key convert-secret-to-public < $TEST_ROOT/sk3)
_NIX_FORCE_HTTP= nix copy --to file://$cacheDir?secret-key=$TEST_ROOT/sk1 $outPath
@@ -186,8 +184,6 @@ clearCacheCache
nix-store -r $outPath --substituters "file://$cacheDir2 file://$cacheDir" --trusted-public-keys "$publicKey"
-fi # HAVE_LIBSODIUM
-
unset _NIX_FORCE_HTTP