test: tighten cli assertion checks

This commit is contained in:
Peter Steinberger
2026-05-11 14:56:43 +01:00
parent 511d706cf5
commit 0c2296015c
7 changed files with 37 additions and 47 deletions

View File

@@ -531,18 +531,17 @@ describe("recoverLaunchAgentAndRecheckGatewayHealth", () => {
}));
const waitForHealthy = vi.fn(async () => stillUnhealthy);
await expect(
recoverLaunchAgentAndRecheckGatewayHealth({
health: unhealthy,
service,
port: 18790,
expectedVersion: "2026.5.3",
deps: { recoverLaunchAgent, waitForHealthy },
}),
).resolves.toMatchObject({
health: { healthy: false, waitOutcome: "timeout" },
launchAgentRecovery: { attempted: true, recovered: true },
const result = await recoverLaunchAgentAndRecheckGatewayHealth({
health: unhealthy,
service,
port: 18790,
expectedVersion: "2026.5.3",
deps: { recoverLaunchAgent, waitForHealthy },
});
expect(result.health.healthy).toBe(false);
expect(result.health.waitOutcome).toBe("timeout");
expect(result.launchAgentRecovery?.attempted).toBe(true);
expect(result.launchAgentRecovery?.recovered).toBe(true);
});
});