mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
committed by
GitHub
parent
2bc1699a37
commit
2b31cf114b
@@ -1221,7 +1221,7 @@ export const handleNodeEvent = async (
|
||||
}
|
||||
}
|
||||
default:
|
||||
return undefined;
|
||||
return { ok: true, event: evt.event, handled: false, reason: "unsupported_event" };
|
||||
}
|
||||
};
|
||||
/* oxlint-disable max-lines -- TODO: split this grandfathered oversized file. */
|
||||
|
||||
@@ -364,13 +364,26 @@ describe("gateway role enforcement", () => {
|
||||
expect(invokeRes.ok).toBe(false);
|
||||
expect(invokeRes.error?.message ?? "").toContain("unauthorized role");
|
||||
|
||||
nodeClient = await connectNodeClientWithPairing({
|
||||
nodeClient = await connectNodeClientWithNodePairing({
|
||||
port,
|
||||
commands: [],
|
||||
instanceId: "node-role-enforcement",
|
||||
displayName: "node-role-enforcement",
|
||||
});
|
||||
|
||||
const unsupportedEvent = await nodeClient.request<{
|
||||
ok: boolean;
|
||||
event?: string;
|
||||
handled?: boolean;
|
||||
reason?: string;
|
||||
}>("node.event", { event: "test.unsupported", payload: { ok: true } });
|
||||
expect(unsupportedEvent).toEqual({
|
||||
ok: true,
|
||||
event: "test.unsupported",
|
||||
handled: false,
|
||||
reason: "unsupported_event",
|
||||
});
|
||||
|
||||
const binsPayload = await nodeClient.request("skills.bins", {});
|
||||
expect(Array.isArray(binsPayload?.bins)).toBe(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user