From 8662a58d9a44fac25e1cb0716c81b906b299cefa Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Tue, 17 Sep 2024 21:25:50 +0000 Subject: [PATCH] ad Signed-off-by: Ramkumar Chinchani --- test/whiteout.bats | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/whiteout.bats b/test/whiteout.bats index 97429bb5..68fc922e 100644 --- a/test/whiteout.bats +++ b/test/whiteout.bats @@ -69,6 +69,16 @@ 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 @@ -76,12 +86,11 @@ EOF # "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'"