diff --git a/tests/functional/local-overlay-store/redundant-add-inner.sh b/tests/functional/local-overlay-store/redundant-add-inner.sh index 71899a9a7..0fb3af2a6 100755 --- a/tests/functional/local-overlay-store/redundant-add-inner.sh +++ b/tests/functional/local-overlay-store/redundant-add-inner.sh @@ -19,9 +19,13 @@ mountOverlayfs ### Do a redundant add # upper layer should not have it +path=$(nix-store --store "$storeA" ../dummy) + expect 1 stat $(toRealPath "$storeBTop/nix/store" "$path") -path=$(nix-store --store "$storeB" --add ../dummy) +pathFromB=$(nix-store --store "$storeB" --add ../dummy) + +[[ $path == $pathFromB ]] # lower store should have it from before stat $(toRealPath "$storeA/nix/store" "$path")