aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ca/build-with-garbage-path.sh2
-rw-r--r--tests/repair.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ca/build-with-garbage-path.sh b/tests/ca/build-with-garbage-path.sh
index 9aa08a899..884cd2802 100755
--- a/tests/ca/build-with-garbage-path.sh
+++ b/tests/ca/build-with-garbage-path.sh
@@ -8,7 +8,7 @@ requireDaemonNewerThan "2.4pre20210621"
# Get the output path of `rootCA`, and put some garbage instead
outPath="$(nix-build ./content-addressed.nix -A rootCA --no-out-link)"
-nix-store --delete "$outPath"
+nix-store --delete $(nix-store -q --referrers-closure "$outPath")
touch "$outPath"
# The build should correctly remove the garbage and put the expected path instead
diff --git a/tests/repair.sh b/tests/repair.sh
index 12dcde8ea..1105b446b 100644
--- a/tests/repair.sh
+++ b/tests/repair.sh
@@ -30,7 +30,7 @@ nix-store --verify-path $path2
chmod u+w $path2
touch $path2/bad
-nix-store --delete $(nix-store -qd $path2)
+nix-store --delete $(nix-store -q --referrers-closure $(nix-store -qd $path2))
(! nix-store --verify --check-contents --repair)