diff options
-rw-r--r-- | tests/binary-cache.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh index 17d7a2df6..40f1a4f76 100644 --- a/tests/binary-cache.sh +++ b/tests/binary-cache.sh @@ -191,6 +191,20 @@ unset _NIX_FORCE_HTTP nix verify -vvvvv --all --store file://$cacheDir --no-trust +# Test local NAR caching. +narCache=$TEST_ROOT/nar-cache +rm -rf $narCache +mkdir $narCache + +[[ $(nix cat-store --store "file://$cacheDir?local-nar-cache=$narCache" $outPath/foobar) = FOOBAR ]] + +rm -rfv "$cacheDir/nar" + +[[ $(nix cat-store --store "file://$cacheDir?local-nar-cache=$narCache" $outPath/foobar) = FOOBAR ]] + +(! nix cat-store --store file://$cacheDir $outPath/foobar) + + # Test NAR listing generation. clearCache |