@@ -15,6 +15,7 @@ import path from "node:path";
1515
1616import { buildAvailabilityProbeEnv } from "../fixtures/availability-env.ts" ;
1717import { assertExitZero , resultText , sandboxAccessEnv } from "../fixtures/clients/index.ts" ;
18+ import { trustedProviderEndpoint } from "../fixtures/clients/provider.ts" ;
1819import { expect , test } from "../fixtures/e2e-test.ts" ;
1920import { shouldRunLiveE2EScenarios } from "../fixtures/live-project-gate.ts" ;
2021import { requireHostedInferenceConfig } from "../fixtures/hosted-inference.ts" ;
@@ -78,6 +79,7 @@ test.skipIf(!shouldRunLiveE2EScenarios())(
7879 cleanup,
7980 host,
8081 lifecycle,
82+ provider,
8183 runtime,
8284 sandbox,
8385 secrets,
@@ -115,17 +117,17 @@ test.skipIf(!shouldRunLiveE2EScenarios())(
115117 skip ( "Docker is required for sandbox survival E2E" ) ;
116118 }
117119
118- const modelsReachable = await host . command (
119- "curl" ,
120- [ "-sf" , "--max-time" , "10" , "https://inference-api.nvidia.com/v1/models" ] ,
120+ const endpointReachable = await provider . probeReachability (
121+ trustedProviderEndpoint ( hosted . endpointUrl , { allowedHosts : [ "inference-api.nvidia.com" ] } ) ,
121122 {
122- artifactName : "prereq-inference-api-models " ,
123+ artifactName : "prereq-inference-api-reachability " ,
123124 env : buildAvailabilityProbeEnv ( ) ,
124125 redactionValues : [ apiKey ] ,
125- timeoutMs : 15_000 ,
126+ timeoutMs : 25_000 ,
126127 } ,
127128 ) ;
128- expect ( modelsReachable . exitCode , resultText ( modelsReachable ) ) . toBe ( 0 ) ;
129+ expect ( endpointReachable . exitCode , resultText ( endpointReachable ) ) . toBe ( 0 ) ;
130+ expect ( endpointReachable . stdout . trim ( ) , resultText ( endpointReachable ) ) . not . toBe ( "000" ) ;
129131 expect ( fs . existsSync ( path . join ( REPO_ROOT , "install.sh" ) ) ) . toBe ( true ) ;
130132
131133 await host . bestEffortCleanupSandbox ( SANDBOX_NAME , {
0 commit comments