nix-super/tests/functional/local-overlay-store/bad-uris.sh
John Ericson 250c3541bb Use local-overlay:// not local-overlay for store URL
This is a bit uglier, but allows us to avoid an ad-hoc special case in
`store-api.cc`.
2023-10-25 15:29:11 -04:00

25 lines
756 B
Bash

source common.sh
requireEnvironment
setupConfig
storeDirs
mkdir -p $TEST_ROOT/bad_test
badTestRoot=$TEST_ROOT/bad_test
storeBadRoot="local-overlay://?root=$badTestRoot&lower-store=$storeA&upper-layer=$storeBTop"
storeBadLower="local-overlay://?root=$storeBRoot&lower-store=$badTestRoot&upper-layer=$storeBTop"
storeBadUpper="local-overlay://?root=$storeBRoot&lower-store=$storeA&upper-layer=$badTestRoot"
declare -a storesBad=(
"$storeBadRoot" "$storeBadLower" "$storeBadUpper"
)
for i in "${storesBad[@]}"; do
echo $i
unshare --mount --map-root-user bash <<EOF
source common.sh
storeDirs
mountOverlayfs
expectStderr 1 nix doctor --store "$i" | grepQuiet "overlay filesystem .* mounted incorrectly"
EOF
done