851851 --for=condition=Ready --timeout=300s
852852 log " LLMBatchGateway is ready."
853853
854+ step " Waiting for AIGateway to be ready..."
855+ kubectl wait aigateway/default-aigateway --for=condition=Ready --timeout=300s
856+ log " AIGateway is ready."
857+
858+ # TODO: Change to die once https://github.com/opendatahub-io/ai-gateway-operator/issues/47 is fixed.
859+ step " Waiting for DataScienceCluster to be ready..."
860+ kubectl wait dsc/default-dsc --for=condition=Ready --timeout=60s \
861+ || warn " DataScienceCluster is not Ready (known issue: github.com/opendatahub-io/ai-gateway-operator/issues/47)"
862+
854863 create_batch_httproute
855864 create_batch_destinationrule
856865}
901910 || die " Internal Gateway '${BATCH_INTERNAL_GATEWAY_NAME} ' not programmed after 300s."
902911
903912 log " Internal Gateway created (ClusterIP, no TLS, no rate limit)."
913+
914+ check_batch_internal_gateway
904915}
905916
906917# Verifies the internal gateway is ClusterIP-only and not exposed externally.
@@ -1073,6 +1084,7 @@ JSONL
10731084 _BATCH_FILE_ID=$( _jval id " $body " )
10741085 echo " File uploaded: ${_BATCH_FILE_ID} "
10751086 else
1087+ echo " File upload failed (HTTP ${http_code} ): ${body} "
10761088 return 1
10771089 fi
10781090
@@ -1089,6 +1101,7 @@ JSONL
10891101 _BATCH_ID=$( _jval id " $body " )
10901102 echo " Batch created: ${_BATCH_ID} "
10911103 else
1104+ echo " Batch creation failed (HTTP ${http_code} ): ${body} "
10921105 return 1
10931106 fi
10941107 }
@@ -1263,4 +1276,5 @@ JSONL
12631276 fi
12641277 echo " Passed: ${_TEST_PASSED} Failed: ${_TEST_FAILED} Total: ${_TEST_TOTAL} "
12651278
1279+ return " ${_TEST_FAILED} "
12661280}
0 commit comments