@@ -760,14 +760,12 @@ EOF
760760@test " Get Image Labels: registry/image-manifest:tag@invalid" {
761761 run get_image_labels registry/image-manifest:tag@invalid
762762
763- local EXPECTED_LINE_1=" get_image_labels: First architecture found:"
764- local EXPECTED_LINE_2=" get_image_labels: failed to inspect the image"
765- local EXPECTED_ERROR_LINE=" Invalid numeric literal at line 1, column 13"
763+ local EXPECTED_LINE_1=" get_first_arch: Error fetching raw manifest for registry/image-manifest@invalid"
764+ local EXPECTED_LINE_2=" get_image_labels: architecture could not be determined for registry/image-manifest@invalid"
766765
767766 [[ " $status " -eq 1 \
768767 && " ${output} " == * " ${EXPECTED_LINE_1} " * \
769- && " ${output} " == * " ${EXPECTED_LINE_2} " * \
770- && " ${output} " == * " ${EXPECTED_ERROR_LINE} " * ]]
768+ && " ${output} " == * " ${EXPECTED_LINE_2} " * ]]
771769}
772770
773771@test " Get relatedImages from operator bundle: valid-operator-bundle-1" {
@@ -1438,12 +1436,12 @@ EOF
14381436
14391437}
14401438
1441- @test " Retry Get Image Labels: registry/image:tag@invalid-url " {
1439+ @test " Retry Get Image Labels: registry/image-manifest@valid " {
14421440 RETRY_COUNT=1
14431441 RETRY_INTERVAL=1
14441442 retry_output=$( get_retry_expected_output)
1445- run get_image_labels registry/image:tag@invalid-url
1446- EXPECTED_RESPONSE=$( echo -e -n " get_image_labels: First architecture found: \n${retry_output} get_image_labels: failed to inspect the image" )
1443+ run get_image_labels registry/image-manifest@valid
1444+ EXPECTED_RESPONSE=$( echo -e -n " get_image_labels: First architecture found: amd64 \n${retry_output} get_image_labels: failed to inspect the image" )
14471445
14481446 [[ " ${output} " == * " ${EXPECTED_RESPONSE} " * && " $status " -eq 1 ]]
14491447}
@@ -2103,4 +2101,18 @@ EOF
21032101
21042102 [ " $status " -eq 1 ]
21052103 [[ " $output " == * " get_first_arch: Error fetching raw manifest" * ]]
2104+ }
2105+ @test " Retry get_first_arch: registry/invalid-image:lates" {
2106+ RETRY_COUNT=1
2107+ RETRY_INTERVAL=1
2108+
2109+ retry_output=$( get_retry_expected_output)
2110+
2111+ run get_first_arch " registry/invalid-image:latest"
2112+
2113+ local EXPECTED_FINAL_ERROR=" get_first_arch: Error fetching raw manifest for ${image} "
2114+ EXPECTED_RESPONSE=$( echo -e " ${retry_output} \n${FINAL_ERROR} " )
2115+ echo " $EXPECTED_RESPONSE "
2116+ [[ " ${output} " == * " ${EXPECTED_RESPONSE} " * && " $status " -eq 1 ]]
2117+
21062118}
0 commit comments