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 <andreifdaaron@gmail.com>
This commit is contained in:
Andrei Aaron
2026-02-01 23:58:18 +02:00
committed by GitHub
parent c8fae88e37
commit 063014a942
4 changed files with 19 additions and 3 deletions
+6 -1
View File
@@ -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" {
+10
View File
@@ -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
+2 -1
View File
@@ -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