@@ -836,14 +836,12 @@ EOF
836836@test " Get Image Labels: registry/image-manifest:tag@invalid" {
837837 run get_image_labels registry/image-manifest:tag@invalid
838838
839- local EXPECTED_LINE_1=" get_image_labels: First architecture found:"
840- local EXPECTED_LINE_2=" get_image_labels: failed to inspect the image"
841- local EXPECTED_ERROR_LINE=" Invalid numeric literal at line 1, column 13"
839+ local EXPECTED_LINE_1=" get_first_arch: Error fetching raw manifest for registry/image-manifest@invalid"
840+ local EXPECTED_LINE_2=" get_image_labels: architecture could not be determined for registry/image-manifest@invalid"
842841
843842 [[ " $status " -eq 1 \
844843 && " ${output} " == * " ${EXPECTED_LINE_1} " * \
845- && " ${output} " == * " ${EXPECTED_LINE_2} " * \
846- && " ${output} " == * " ${EXPECTED_ERROR_LINE} " * ]]
844+ && " ${output} " == * " ${EXPECTED_LINE_2} " * ]]
847845}
848846
849847@test " Get relatedImages from operator bundle: valid-operator-bundle-1" {
@@ -1514,12 +1512,12 @@ EOF
15141512
15151513}
15161514
1517- @test " Retry Get Image Labels: registry/image:tag@invalid-url " {
1515+ @test " Retry Get Image Labels: registry/image-manifest@valid " {
15181516 RETRY_COUNT=1
15191517 RETRY_INTERVAL=1
15201518 retry_output=$( get_retry_expected_output)
1521- run get_image_labels registry/image:tag@invalid-url
1522- EXPECTED_RESPONSE=$( echo -e -n " get_image_labels: First architecture found: \n${retry_output} get_image_labels: failed to inspect the image" )
1519+ run get_image_labels registry/image-manifest@valid
1520+ EXPECTED_RESPONSE=$( echo -e -n " get_image_labels: First architecture found: amd64 \n${retry_output} get_image_labels: failed to inspect the image" )
15231521
15241522 [[ " ${output} " == * " ${EXPECTED_RESPONSE} " * && " $status " -eq 1 ]]
15251523}
@@ -2179,4 +2177,18 @@ EOF
21792177
21802178 [ " $status " -eq 1 ]
21812179 [[ " $output " == * " get_first_arch: Error fetching raw manifest" * ]]
2180+ }
2181+ @test " Retry get_first_arch: registry/invalid-image:lates" {
2182+ RETRY_COUNT=1
2183+ RETRY_INTERVAL=1
2184+
2185+ retry_output=$( get_retry_expected_output)
2186+
2187+ run get_first_arch " registry/invalid-image:latest"
2188+
2189+ local EXPECTED_FINAL_ERROR=" get_first_arch: Error fetching raw manifest for ${image} "
2190+ EXPECTED_RESPONSE=$( echo -e " ${retry_output} \n${FINAL_ERROR} " )
2191+ echo " $EXPECTED_RESPONSE "
2192+ [[ " ${output} " == * " ${EXPECTED_RESPONSE} " * && " $status " -eq 1 ]]
2193+
21822194}
0 commit comments