aboutsummaryrefslogtreecommitdiff
path: root/tests/ca
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-05-10 20:37:57 +0200
committerGitHub <noreply@github.com>2021-05-10 20:37:57 +0200
commit7f9759b18d786d26574bfaf3fa00f71402615ff8 (patch)
tree7b2005332f20b056fd225adbd2680e170d3d0196 /tests/ca
parent8768398d5fff731ea6c9f34d16123b09b20f8a83 (diff)
parentd5d19582ef24af3754f7a2675f43d6828c3a8638 (diff)
Merge pull request #4781 from NixOS/locally_cache_the_remote_realisations
Add a realisations disk cache
Diffstat (limited to 'tests/ca')
-rw-r--r--tests/ca/substitute.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ca/substitute.sh b/tests/ca/substitute.sh
index 737c851a5..dfc4ea68e 100644
--- a/tests/ca/substitute.sh
+++ b/tests/ca/substitute.sh
@@ -45,3 +45,16 @@ if [[ -z "$(ls "$REMOTE_STORE_DIR/realisations")" ]]; then
echo "Realisations not rebuilt"
exit 1
fi
+
+# Test the local realisation disk cache
+buildDrvs --post-build-hook ../push-to-store.sh
+clearStore
+# Add the realisations of rootCA to the cachecache
+clearCacheCache
+export _NIX_FORCE_HTTP=1
+buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0
+# Try rebuilding, but remove the realisations from the remote cache to force
+# using the cachecache
+clearStore
+rm $REMOTE_STORE_DIR/realisations/*
+buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0