More tests

This commit is contained in:
John Ericson 2023-05-09 16:49:44 -04:00
parent 5059be53b1
commit 8339c170d7

View file

@ -55,18 +55,26 @@ expect 1 stat $(toRealPath "$storeBTop" "$path")
# Checking for path in overlay store matching lower layer
diff $(toRealPath "$storeA/nix/store" "$path") $(toRealPath "$TEST_ROOT/merged-store/nix/store" "$path")
# Verifying path in lower layer
nix-store --verify-path --store "$storeA" "$path"
# Verifying path in merged-store
nix-store --verify-path --store "$storeB" "$path"
# Checking derivers query agreement
[[ \
$(nix-store --store $storeA --query --deriver $path) \
== \
$(nix-store --store $storeB --query --deriver $path) \
]]
# Checking outputs query agreement
[[ \
$(nix-store --store $storeA --query --outputs $drvPath) \
== \
$(nix-store --store $storeB --query --outputs $drvPath) \
]]
# Verifying path in lower layer
nix-store --verify-path --store "$storeA" "$path"
# Verifying path in merged-store
nix-store --verify-path --store "$storeB" "$path"
hashPart=$(echo $path | sed "s^$NIX_STORE_DIR/^^" | sed 's/-.*//')
# Lower store can find from hash part