Files
lix/tests/functional/binary-cache-regression-fj647.sh
T
jade 4b6dbc96c1 Revert "libstore: always load localstore public keys"
Though this is a revert, it also involves fixing the code with new code
and a regression test. The problematic locking that was there before has
been removed, in any case.

This reverts commit ba728e46be.

Reason for revert: regression.
Fixes: https://git.lix.systems/lix-project/lix/issues/647

Change-Id: I326b1a10042ff69afbab38426e042e0dc2224a13
2025-01-23 17:57:52 -08:00

18 lines
596 B
Bash

source common.sh
# Regression test for https://git.lix.systems/lix-project/lix/issues/647
# Create the binary cache.
clearStore
clearCache
outPath=$(nix-build dependencies.nix --no-out-link)
nix key generate-secret --key-name test > "$TEST_ROOT/priv.key"
pubkey="$(nix key convert-secret-to-public < "$TEST_ROOT/priv.key")"
_NIX_FORCE_HTTP= nix copy --to file://$cacheDir?secret-key="$TEST_ROOT/priv.key" "$outPath"
clearStore
startDaemon
expect 1 nix-store -r --substituters file://$cacheDir "$outPath"
nix-store -r --trusted-public-keys "$pubkey" --substituters file://$cacheDir "$outPath"