mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
test(blackbox): fix the scrub test sometimes deleting the image manifest from the layout (#2236)
If the manifest is not present, scrub no longer errors, so the test looking for errors in the log was not failing. See the related scrub changes in: https://github.com/project-zot/zot/pull/2180 Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
parent
60dc8569ec
commit
f1d38d9dad
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,8 @@ function add_test_files() {
|
||||||
|
|
||||||
function delete_blob() {
|
function delete_blob() {
|
||||||
local zot_test_files=${BATS_FILE_TMPDIR}/zot/alpine
|
local zot_test_files=${BATS_FILE_TMPDIR}/zot/alpine
|
||||||
find ${zot_test_files}/blobs/sha256 -maxdepth 1 -type f -name "*" -print0 |
|
# Delete one of the blobs which is not of type json, meaning not a manifest/config
|
||||||
|
find ${zot_test_files}/blobs/sha256 -maxdepth 1 -type f -name "*" -exec sh -c 'file -b "$1" | grep -iqv "json"' sh {} \; -print0|
|
||||||
sort -z -R |
|
sort -z -R |
|
||||||
head -z -n 1 | xargs -0 rm
|
head -z -n 1 | xargs -0 rm
|
||||||
ls -al ${zot_test_files}/blobs/sha256/
|
ls -al ${zot_test_files}/blobs/sha256/
|
||||||
|
|
Loading…
Reference in a new issue