File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ ${SCRIPTPATH}/setup_images.sh
1414tests=(" pushpull" " pushpull_authn" " delete_images" " referrers" " metadata" " anonymous_policy"
1515 " annotations" " detect_manifest_collision" " cve" " sync" " sync_docker" " sync_replica_cluster"
1616 " scrub" " garbage_collect" " metrics" " metrics_minimal" " multiarch_index" " docker_compat" " redis_local" " redis_session_store"
17- " events_nats" " events_http" " events_nats_lint_failure" " events_http_lint_failure" " events_sink_failure" " events_config_decoding" )
17+ " events_nats" " events_http" " events_nats_lint_failure" " events_http_lint_failure" " events_sink_failure" " events_config_decoding"
18+ " fips140" )
1819
1920for test in ${tests[*]} ; do
2021 ${BATS} ${BATS_FLAGS} ${SCRIPTPATH} /${test} .bats > ${test} .log & pids+=($! )
Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ function setup_file() {
2929 # Setup zot server
3030 local zot_root_dir=${BATS_FILE_TMPDIR} /zot
3131 local zot_config_file=${BATS_FILE_TMPDIR} /zot_config.json
32+ ZOT_LOG_FILE=${zot_root_dir} /zot-log.json
3233 local oci_data_dir=${BATS_FILE_TMPDIR} /oci
3334 mkdir -p ${zot_root_dir}
3435 mkdir -p ${oci_data_dir}
3536 zot_port=$( get_free_port_for_service " zot" )
3637 echo ${zot_port} > ${BATS_FILE_TMPDIR} /zot.port
38+ touch ${ZOT_LOG_FILE}
3739 cat > ${zot_config_file} << EOF
3840{
3941 "distSpecVersion": "1.1.1",
@@ -46,7 +48,7 @@ function setup_file() {
4648 },
4749 "log": {
4850 "level": "debug",
49- "output": "${BATS_FILE_TMPDIR} /zot.log "
51+ "output": "${ZOT_LOG_FILE} "
5052 }
5153}
5254EOF
5961
6062function teardown() {
6163 # conditionally printing on failure is possible from teardown but not from from teardown_file
62- cat ${BATS_FILE_TMPDIR} /zot. log
64+ cat ${BATS_FILE_TMPDIR} /zot/zot- log.json
6365}
6466
6567function teardown_file() {
Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ function delete_blob() {
1414 ls -al ${zot_test_files} /blobs/sha256/
1515}
1616
17- function log_output() {
18- local zot_log_file=${BATS_FILE_TMPDIR} /zot/zot-log.json
19- cat ${zot_log_file} | jq ' .["message"] '
20- }
21-
2217function affected() {
2318 log_output | jq ' contains("blobs/manifest affected")?' | grep true
2419}
Original file line number Diff line number Diff line change @@ -54,3 +54,8 @@ function zb_run() {
5454 local zot_address=${1}
5555 ${ZB_PATH} -c 10 -n 30 -o stdout ${zot_address} --skip-cleanup
5656}
57+
58+ function log_output() {
59+ local zot_log_file=${BATS_FILE_TMPDIR} /zot/zot-log.json
60+ cat ${zot_log_file} | jq ' .["message"] '
61+ }
Original file line number Diff line number Diff line change 402402 "begin" : 11420 ,
403403 "end" : 11429
404404 }
405+ },
406+ "blackbox/fips140.bats" : {
407+ "zot" : {
408+ "begin" : 11430 ,
409+ "end" : 11439
410+ }
405411 }
406- }
412+ }
You can’t perform that action at this time.
0 commit comments