Skip to content

Commit

Permalink
ad
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Sep 17, 2024
1 parent c1f7c61 commit 8662a58
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/whiteout.bats
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,28 @@ fulldir:
rm -rf /a1
mkdir /a1
touch /a1/newfile
redo:
from:
type: built
tag: bb
run: |
rm -rf /a1
mkdir /a1
touch /a1/newfile
EOF

stacker build

# "bb" should not have a whiteout entry for /a1
md=$(cat oci/index.json | jq .manifests[0].digest | sed s/sha256://g | tr -d \")
ld=$(cat oci/blobs/sha256/"$md" | jq .layers[-1].digest | sed s/sha256://g | tr -d \")
"bsdtar -tvf oci/blobs/sha256/$ld | grep '.wh.a1'"
run "bsdtar -tvf oci/blobs/sha256/$ld | grep '.wh.a1'"
[ "$status" -ne 0 ]

# "fulldir" should have a whiteout entry for /a1
md=$(cat oci/index.json | jq .manifests[3].digest | sed s/sha256://g | tr -d \")
# "redo" should have a whiteout entry for /a1
md=$(cat oci/index.json | jq .manifests[4].digest | sed s/sha256://g | tr -d \")
ld=$(cat oci/blobs/sha256/"$md" | jq .layers[-1].digest | sed s/sha256://g | tr -d \")
"bsdtar -tvf oci/blobs/sha256/$ld | grep '.wh.a1'"
run "bsdtar -tvf oci/blobs/sha256/$ld | grep '.wh.a1'"
Expand Down

0 comments on commit 8662a58

Please sign in to comment.