Skip to content

Commit f1a2433

Browse files
committed
test(e2e): reject failed hosted reachability probes
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
1 parent f978e9f commit f1a2433

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

test/e2e-scenario/live/hermes-e2e.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,12 @@ test.skipIf(!shouldRunLiveE2EScenarios())(
286286
timeoutMs: 30_000,
287287
},
288288
);
289+
const reachabilityStatus = providerReachability.stdout.trim();
289290
expect(providerReachability.exitCode, resultText(providerReachability)).toBe(0);
290-
expect(providerReachability.stdout.trim(), resultText(providerReachability)).not.toBe("000");
291+
expect(["000", "401", "403"], resultText(providerReachability)).not.toContain(
292+
reachabilityStatus,
293+
);
294+
expect(Number(reachabilityStatus), resultText(providerReachability)).toBeLessThan(500);
291295

292296
// Phase 2: real installer + non-interactive Hermes onboard.
293297
const install = await host.command("bash", ["install.sh", "--non-interactive"], {

test/e2e-scenario/live/sandbox-survival.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ test.skipIf(!shouldRunLiveE2EScenarios())(
126126
timeoutMs: 25_000,
127127
},
128128
);
129+
const reachabilityStatus = endpointReachable.stdout.trim();
129130
expect(endpointReachable.exitCode, resultText(endpointReachable)).toBe(0);
130-
expect(endpointReachable.stdout.trim(), resultText(endpointReachable)).not.toBe("000");
131+
expect(["000", "401", "403"], resultText(endpointReachable)).not.toContain(reachabilityStatus);
132+
expect(Number(reachabilityStatus), resultText(endpointReachable)).toBeLessThan(500);
131133
expect(fs.existsSync(path.join(REPO_ROOT, "install.sh"))).toBe(true);
132134

133135
await host.bestEffortCleanupSandbox(SANDBOX_NAME, {

0 commit comments

Comments
 (0)