mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 05:14:33 +00:00
feat(macos): add direct gateway transport
This commit is contained in:
committed by
Peter Steinberger
parent
2c5141d7df
commit
5330595a5a
33
src/config/config.gateway-remote-transport.test.ts
Normal file
33
src/config/config.gateway-remote-transport.test.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
describe("gateway.remote.transport", () => {
|
||||
it("accepts direct transport", async () => {
|
||||
vi.resetModules();
|
||||
const { validateConfigObject } = await import("./config.js");
|
||||
const res = validateConfigObject({
|
||||
gateway: {
|
||||
remote: {
|
||||
transport: "direct",
|
||||
url: "wss://gateway.example.ts.net",
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects unknown transport", async () => {
|
||||
vi.resetModules();
|
||||
const { validateConfigObject } = await import("./config.js");
|
||||
const res = validateConfigObject({
|
||||
gateway: {
|
||||
remote: {
|
||||
transport: "udp",
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(res.ok).toBe(false);
|
||||
if (!res.ok) {
|
||||
expect(res.issues[0]?.path).toBe("gateway.remote.transport");
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user