mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 17:01:05 +00:00
test: encase discovery log calls
This commit is contained in:
@@ -150,8 +150,10 @@ describe("startGatewayDiscovery", () => {
|
||||
|
||||
expect(result.bonjourStop).toBeTypeOf("function");
|
||||
await result.bonjourStop?.();
|
||||
expect(logs.warn.mock.calls).toContainEqual([
|
||||
"gateway discovery service timed out after 10ms (stuck-discovery, plugin=stuck-discovery); continuing startup",
|
||||
expect(logs.warn.mock.calls).toEqual([
|
||||
[
|
||||
"gateway discovery service timed out after 10ms (stuck-discovery, plugin=stuck-discovery); continuing startup",
|
||||
],
|
||||
]);
|
||||
|
||||
vi.useRealTimers();
|
||||
@@ -227,8 +229,8 @@ describe("startGatewayDiscovery", () => {
|
||||
expect(zoneParams.displayName).toBe("Lab Mac (OpenClaw)");
|
||||
expect(zoneParams.tailnetIPv4).toBe("100.64.0.10");
|
||||
expect(zoneParams.tailnetDns).toBe("gateway.tailnet.example.ts.net");
|
||||
expect(logs.info.mock.calls).toContainEqual([
|
||||
"wide-area DNS-SD updated (openclaw.internal. → /tmp/openclaw.internal.db)",
|
||||
expect(logs.info.mock.calls).toEqual([
|
||||
["wide-area DNS-SD updated (openclaw.internal. → /tmp/openclaw.internal.db)"],
|
||||
]);
|
||||
expect(result.bonjourStop).toBeNull();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user