diff --git a/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0113__dsc_components.robot b/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0113__dsc_components.robot index a73cdb50c..96331f13e 100644 --- a/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0113__dsc_components.robot +++ b/ods_ci/tests/Tests/0100__platform/0101__deploy/0104__operators/0104__rhods_operator/0113__dsc_components.robot @@ -48,6 +48,7 @@ ${IS_NOT_PRESENT} 1 ... KSERVE=${EMPTY} @{CONTROLLERS_LIST} kserve-controller-manager odh-model-controller modelmesh-controller +@{REDHATIO_PATH_CHECK_EXCLUSTION_LIST} kserve-controller-manager *** Test Cases *** @@ -304,6 +305,8 @@ Set DSC Component Managed State And Wait For Completion Wait For Resources To Be Available ${deployment_name} ${label_selector} + Check Image Pull Path Is Redhatio ${deployment_name} + Wait For Resources To Be Available [Documentation] Wait until Deployment and Pod(s) are Available [Arguments] ${deployment_name} ${label_selector} @@ -358,3 +361,24 @@ Get DataScienceCluster Spec ... oc get DataScienceCluster/${DSC_NAME} -n ${OPERATOR_NS} -o "jsonpath={".spec"}" Should Be Equal As Integers ${rc} 0 RETURN ${output} + +Check Image Pull Path Is Redhatio + [Documentation] Check that the Deployment Image Pull Path is registry.redhat.io + [Arguments] ${deployment_name} + + # Skip pull path check if Deployment is in exclusion list + IF $deployment_name in @{REDHATIO_PATH_CHECK_EXCLUSTION_LIST} + Log To Console Skip image pull path check for Deployment ${deployment_name} + RETURN + END + + ${rc} ${image}= Run And Return Rc And Output + ... oc get deployment/${deployment_name} -n ${APPLICATIONS_NAMESPACE} -o jsonpath="{..image}" + Should Be Equal As Integers ${rc} 0 msg=${image} + + Log To Console Check deployment ${deployment_name} pull path for image ${image} + IF "registry.redhat.io" in $image + Log To Console Deployment ${deployment_name} image contains pull path registry.redhat.io + ELSE + Fail Deployment image ${deployment_name} does not contain pull path registry.redhat.io + END