mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Fix tests after last rename (path
-> pathInLowerStore
)
This commit is contained in:
parent
c90e46d3f0
commit
8d0a03b5a2
2 changed files with 15 additions and 15 deletions
|
@ -19,13 +19,13 @@ mountOverlayfs
|
||||||
### Check status
|
### Check status
|
||||||
|
|
||||||
# Checking for path in lower layer
|
# Checking for path in lower layer
|
||||||
stat $(toRealPath "$storeA/nix/store" "$path")
|
stat $(toRealPath "$storeA/nix/store" "$pathInLowerStore")
|
||||||
|
|
||||||
# Checking for path in upper layer (should fail)
|
# Checking for path in upper layer (should fail)
|
||||||
expect 1 stat $(toRealPath "$storeBTop" "$path")
|
expect 1 stat $(toRealPath "$storeBTop" "$pathInLowerStore")
|
||||||
|
|
||||||
# Checking for path in overlay store matching lower layer
|
# Checking for path in overlay store matching lower layer
|
||||||
diff $(toRealPath "$storeA/nix/store" "$path") $(toRealPath "$storeBRoot/nix/store" "$path")
|
diff $(toRealPath "$storeA/nix/store" "$pathInLowerStore") $(toRealPath "$storeBRoot/nix/store" "$pathInLowerStore")
|
||||||
|
|
||||||
# Checking requisites query agreement
|
# Checking requisites query agreement
|
||||||
[[ \
|
[[ \
|
||||||
|
@ -44,9 +44,9 @@ busyboxStore=$(nix store --store $storeA add-path $busybox)
|
||||||
|
|
||||||
# Checking derivers query agreement
|
# Checking derivers query agreement
|
||||||
[[ \
|
[[ \
|
||||||
$(nix-store --store $storeA --query --deriver $path) \
|
$(nix-store --store $storeA --query --deriver $pathInLowerStore) \
|
||||||
== \
|
== \
|
||||||
$(nix-store --store $storeB --query --deriver $path) \
|
$(nix-store --store $storeB --query --deriver $pathInLowerStore) \
|
||||||
]]
|
]]
|
||||||
|
|
||||||
# Checking outputs query agreement
|
# Checking outputs query agreement
|
||||||
|
@ -57,15 +57,15 @@ busyboxStore=$(nix store --store $storeA add-path $busybox)
|
||||||
]]
|
]]
|
||||||
|
|
||||||
# Verifying path in lower layer
|
# Verifying path in lower layer
|
||||||
nix-store --verify-path --store "$storeA" "$path"
|
nix-store --verify-path --store "$storeA" "$pathInLowerStore"
|
||||||
|
|
||||||
# Verifying path in merged-store
|
# Verifying path in merged-store
|
||||||
nix-store --verify-path --store "$storeB" "$path"
|
nix-store --verify-path --store "$storeB" "$pathInLowerStore"
|
||||||
|
|
||||||
hashPart=$(echo $path | sed "s^${NIX_STORE_DIR:-/nix/store}/^^" | sed 's/-.*//')
|
hashPart=$(echo $pathInLowerStore | sed "s^${NIX_STORE_DIR:-/nix/store}/^^" | sed 's/-.*//')
|
||||||
|
|
||||||
# Lower store can find from hash part
|
# Lower store can find from hash part
|
||||||
[[ $(nix store --store $storeA path-from-hash-part $hashPart) == $path ]]
|
[[ $(nix store --store $storeA path-from-hash-part $hashPart) == $pathInLowerStore ]]
|
||||||
|
|
||||||
# merged store can find from hash part
|
# merged store can find from hash part
|
||||||
[[ $(nix store --store $storeB path-from-hash-part $hashPart) == $path ]]
|
[[ $(nix store --store $storeB path-from-hash-part $hashPart) == $pathInLowerStore ]]
|
||||||
|
|
|
@ -19,17 +19,17 @@ mountOverlayfs
|
||||||
### Do a redundant add
|
### Do a redundant add
|
||||||
|
|
||||||
# (Already done in `initLowerStore`, but repeated here for clarity.)
|
# (Already done in `initLowerStore`, but repeated here for clarity.)
|
||||||
path=$(nix-store --store "$storeA" --add ../dummy)
|
pathInLowerStore=$(nix-store --store "$storeA" --add ../dummy)
|
||||||
|
|
||||||
# upper layer should not have it
|
# upper layer should not have it
|
||||||
expect 1 stat $(toRealPath "$storeBTop/nix/store" "$path")
|
expect 1 stat $(toRealPath "$storeBTop/nix/store" "$pathInLowerStore")
|
||||||
|
|
||||||
pathFromB=$(nix-store --store "$storeB" --add ../dummy)
|
pathFromB=$(nix-store --store "$storeB" --add ../dummy)
|
||||||
|
|
||||||
[[ $path == $pathFromB ]]
|
[[ $pathInLowerStore == $pathFromB ]]
|
||||||
|
|
||||||
# lower store should have it from before
|
# lower store should have it from before
|
||||||
stat $(toRealPath "$storeA/nix/store" "$path")
|
stat $(toRealPath "$storeA/nix/store" "$pathInLowerStore")
|
||||||
|
|
||||||
# upper layer should still not have it (no redundant copy)
|
# upper layer should still not have it (no redundant copy)
|
||||||
expect 1 stat $(toRealPath "$storeBTop" "$path")
|
expect 1 stat $(toRealPath "$storeBTop" "$pathInLowerStore")
|
||||||
|
|
Loading…
Reference in a new issue