mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 19:01:47 +03:00
feat(hooks): allow gmail tailscale target URLs
This commit is contained in:
@@ -130,4 +130,33 @@ describe("gmail hook config", () => {
|
||||
expect(result.value.tailscale.path).toBe("/custom");
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps serve path when tailscale target is set", () => {
|
||||
const result = resolveGmailHookRuntimeConfig(
|
||||
{
|
||||
hooks: {
|
||||
token: "hook-token",
|
||||
gmail: {
|
||||
account: "clawdbot@gmail.com",
|
||||
topic: "projects/demo/topics/gog-gmail-watch",
|
||||
pushToken: "push-token",
|
||||
serve: { path: "/custom" },
|
||||
tailscale: {
|
||||
mode: "funnel",
|
||||
target: "http://127.0.0.1:8788/custom",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{},
|
||||
);
|
||||
expect(result.ok).toBe(true);
|
||||
if (result.ok) {
|
||||
expect(result.value.serve.path).toBe("/custom");
|
||||
expect(result.value.tailscale.path).toBe("/custom");
|
||||
expect(result.value.tailscale.target).toBe(
|
||||
"http://127.0.0.1:8788/custom",
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user