@@ -20,6 +20,7 @@ function verify_prerequisites {
2020}
2121
2222function setup_file() {
23+ export REGISTRY_NAME=main
2324 # Verify prerequisites are available
2425 if ! $( verify_prerequisites) ; then
2526 exit 1
@@ -401,6 +402,14 @@ DOCKERFILE
401402 [ " $status " -eq 1 ]
402403}
403404
405+ @test " [release] list by image name" {
406+ zot_port=` cat ${BATS_FILE_TMPDIR} /zot.port`
407+ run ${ZLI_PATH} repo list --config ${REGISTRY_NAME}
408+ [ " $status " -eq 0 ]
409+
410+ echo ${lines[@]}
411+ }
412+
404413@test " [release] cve by image name and tag" {
405414 zot_port=` cat ${BATS_FILE_TMPDIR} /zot.port`
406415 run ${ZLI_PATH} cve list golang:1.20 --config ${REGISTRY_NAME}
@@ -759,6 +768,26 @@ DOCKERFILE
759768 [ " $status " -eq 1 ]
760769}
761770
771+ @test " [new] list by image name" {
772+ zot_port=` cat ${BATS_FILE_TMPDIR} /zot.port`
773+ run ${ZLI_PATH} repo list --config ${REGISTRY_NAME}
774+ [ " $status " -eq 0 ]
775+
776+ echo ${lines[@]}
777+ found=0
778+ for i in " ${lines[@]} "
779+ do
780+ case " $i " in
781+ alpine | busybox | golang)
782+ (( ++ found))
783+ ;;
784+ * )
785+ ;;
786+ esac
787+ done
788+ [ " $found " -eq 3 ]
789+ }
790+
762791@test " [new] cve by image name and tag" {
763792 zot_port=` cat ${BATS_FILE_TMPDIR} /zot.port`
764793 run ${ZLI_PATH} cve list golang:1.20 --config ${REGISTRY_NAME}
@@ -785,7 +814,7 @@ DOCKERFILE
785814 for i in " ${lines[@]} "
786815 do
787816
788- if [[ " $i " = * " CVE-2011-4915 LOW fs/proc/base.c in the Linux kernel through 3 ..." * ]]; then
817+ if [[ " $i " = * " CVE-2004-0230 LOW TCP, when using a large Window Size, makes it ..." * ]]; then
789818 found=1
790819 fi
791820 done
0 commit comments