fix: stabilize gateway tests

This commit is contained in:
Peter Steinberger
2026-01-20 16:02:38 +00:00
parent 99fc0fbac1
commit 404470853a
2 changed files with 3 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ async function ensureResponseConsumed(res: Response) {
}
describe("OpenResponses HTTP API (e2e)", () => {
it("is disabled by default (requires config)", async () => {
it("is disabled by default (requires config)", { timeout: 120_000 }, async () => {
const port = await getFreePort();
const server = await startServerWithDefaultConfig(port);
try {

View File

@@ -117,7 +117,8 @@ describe("gateway bonjour advertiser", () => {
expect(createService).toHaveBeenCalledTimes(1);
const [gatewayCall] = createService.mock.calls as Array<[Record<string, unknown>]>;
expect(gatewayCall?.[0]?.type).toBe("clawdbot-gw");
expect(String(gatewayCall?.[0]?.type ?? "").length).toBeLessThanOrEqual(15);
const gatewayType = asString(gatewayCall?.[0]?.type, "");
expect(gatewayType.length).toBeLessThanOrEqual(15);
expect(gatewayCall?.[0]?.port).toBe(18789);
expect(gatewayCall?.[0]?.domain).toBe("local");
expect(gatewayCall?.[0]?.hostname).toBe("test-host");