Skip to content

Commit 3dcd7d1

Browse files
authored
ci: fix nightly (#3431)
ci: fix nightly and show logs for nightly sync tests Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
1 parent 86af38a commit 3dcd7d1

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

test/blackbox/sync_harness.bats

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,22 @@ EOF
9191
}
9292
EOF
9393
zot_serve ${ZOT_MINIMAL_PATH} ${zot_minimal_config_file}
94-
wait_zot_reachable ${zot_sync_per_cfg_port}
94+
wait_zot_reachable ${zot_minimal_port}
9595
}
9696

9797
function teardown_file() {
9898
zot_stop_all
9999
}
100100

101+
function teardown() {
102+
local zot_minimal_log_file="${BATS_FILE_TMPDIR}/zot-minimal/zot.log"
103+
local zot_sync_log_file="${BATS_FILE_TMPDIR}/zot-per/zot.log"
104+
echo "zot minimal logs"
105+
cat ${zot_minimal_log_file}
106+
echo "zot sync logs"
107+
cat ${zot_sync_log_file}
108+
}
109+
101110
# sync zb images
102111
@test "run zb benchmark and let zot sync all repos" {
103112
zot_sync_per_cfg_port=`cat ${BATS_FILE_TMPDIR}/zot_sync.port`
@@ -108,11 +117,11 @@ function teardown_file() {
108117
local zot_minimal_root_dir=${BATS_FILE_TMPDIR}/zot-minimal
109118
local ZOT_LOG_FILE=${zot_sync_per_root_dir}/zot.log
110119

111-
zb_run "http://127.0.0.1:${zot_sync_per_cfg_port}"
120+
zb_run "http://127.0.0.1:${zot_minimal_port}"
112121

113122
# start zot sync server
114123
zot_serve ${ZOT_PATH} ${zot_sync_per_config_file}
115-
wait_zot_reachable ${zot_minimal_port}
124+
wait_zot_reachable ${zot_sync_per_cfg_port}
116125

117126
start=`date +%s`
118127
echo "waiting for sync to finish" >&3

0 commit comments

Comments
 (0)