From 063014a9428661ae02018d345cacca4c61d9507a Mon Sep 17 00:00:00 2001 From: Andrei Aaron Date: Sun, 1 Feb 2026 23:58:18 +0200 Subject: [PATCH] ci: improvements for the Ecosystem tools job (#3762) ci: blackbox test impromentts A mutated zli config could be the cause of https://github.com/project-zot/zot/actions/runs/21560982825/job/62141227950 1. show zli configuration after cve.basts finishes running 2. ensure the zli config is removed in between test files 3. ensure teh zli configs use different names, not "main" Signed-off-by: Andrei Aaron --- .github/workflows/ecosystem-tools.yaml | 2 +- test/blackbox/cve.bats | 7 ++++++- test/blackbox/helpers_zot.bash | 10 ++++++++++ test/blackbox/upgrade.bats | 3 ++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ecosystem-tools.yaml b/.github/workflows/ecosystem-tools.yaml index 62ca824e..617a888e 100644 --- a/.github/workflows/ecosystem-tools.yaml +++ b/.github/workflows/ecosystem-tools.yaml @@ -114,7 +114,7 @@ jobs: with: name: zot-scale-out-dynamodb-logs path: /tmp/zot-ft-logs - if-no-files-found: error + if-no-files-found: ignore - name: DynamoDB multi-hop detection id: dynamodb_multihop run: | diff --git a/test/blackbox/cve.bats b/test/blackbox/cve.bats index 19b721eb..47e13e5a 100644 --- a/test/blackbox/cve.bats +++ b/test/blackbox/cve.bats @@ -20,7 +20,8 @@ function verify_prerequisites { } function setup_file() { - export REGISTRY_NAME=main + # Use unique config name based on test file name and test run to avoid conflicts + export REGISTRY_NAME=$(basename "${BASH_SOURCE[0]}" .bats)-$(basename "${BATS_FILE_TMPDIR}") # Verify prerequisites are available if ! $(verify_prerequisites); then exit 1 @@ -69,10 +70,14 @@ EOF function teardown() { # conditionally printing on failure is possible from teardown but not from from teardown_file cat ${BATS_FILE_TMPDIR}/zot.log + # Show zli config for debugging + zli_show_config ${REGISTRY_NAME} } function teardown_file() { zot_stop_all + # Clean up zli config + zli_delete_config ${REGISTRY_NAME} } @test "cve by image name and tag" { diff --git a/test/blackbox/helpers_zot.bash b/test/blackbox/helpers_zot.bash index 7aa11e39..829b2cf1 100644 --- a/test/blackbox/helpers_zot.bash +++ b/test/blackbox/helpers_zot.bash @@ -121,6 +121,16 @@ function zli_add_config() { ${ZLI_PATH} config add ${registry_name} ${registry_url} } +function zli_show_config() { + local registry_name=${1} + ${ZLI_PATH} config ${registry_name} -l || true +} + +function zli_delete_config() { + local registry_name=${1} + ${ZLI_PATH} config remove ${registry_name} || true +} + function zb_run() { local zot_address=${1} ${ZB_PATH} -c 10 -n 30 -o stdout ${zot_address} --skip-cleanup diff --git a/test/blackbox/upgrade.bats b/test/blackbox/upgrade.bats index c396b38e..357f1440 100644 --- a/test/blackbox/upgrade.bats +++ b/test/blackbox/upgrade.bats @@ -7,7 +7,8 @@ load helpers_upgrade load ../port_helper function setup_file() { - export REGISTRY_NAME=main + # Use unique config name based on test file name and test run to avoid conflicts + export REGISTRY_NAME=$(basename "${BASH_SOURCE[0]}" .bats)-$(basename "${BATS_FILE_TMPDIR}") # Verify prerequisites are available if ! $(verify_prerequisites); then exit 1