1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/tests/overlay-local-store/redundant-add-inner.sh
John Ericson 5d18120ba8 Split tests some more
Good for parallelism and easier reading.
2023-05-15 23:11:17 -04:00

27 lines
484 B
Bash
Executable file

#!/usr/bin/env bash
set -eu -o pipefail
set -x
source common.sh
storeDirs
initLowerStore
mountOverlayfs
### Do a redundant add
# upper layer should not have it
expect 1 stat $(toRealPath "$storeBTop/nix/store" "$path")
path=$(nix-store --store "$storeB" --add ../dummy)
# lower store should have it from before
stat $(toRealPath "$storeA/nix/store" "$path")
# upper layer should still not have it (no redundant copy)
expect 1 stat $(toRealPath "$storeB/nix/store" "$path")