feat(hooks): allow gmail tailscale target URLs

This commit is contained in:
Peter Steinberger
2026-01-10 19:19:30 +01:00
parent 0335bccd91
commit 1fe9f648b1
12 changed files with 89 additions and 7 deletions
+29
View File
@@ -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",
);
}
});
});