
























@@ -59,9 +59,13 @@ const fetchGuardMocks = vi.hoisted(() => ({
5959),
6060}));
616162-vi.mock("openclaw/plugin-sdk/ssrf-runtime", () => ({
63-fetchWithSsrFGuard: fetchGuardMocks.fetchWithSsrFGuard,
64-}));
62+vi.mock("openclaw/plugin-sdk/ssrf-runtime", async (importOriginal) => {
63+const actual = await importOriginal<typeof import("openclaw/plugin-sdk/ssrf-runtime")>();
64+return {
65+ ...actual,
66+fetchWithSsrFGuard: fetchGuardMocks.fetchWithSsrFGuard,
67+};
68+});
65696670vi.mock("./src/voice-call-gateway.js", () => ({
6771joinMeetViaVoiceCallGateway: voiceCallMocks.joinMeetViaVoiceCallGateway,
@@ -1481,48 +1485,55 @@ describe("google-meet plugin", () => {
14811485);
14821486});
148314871484-it("reports local voice-call publicUrl as unusable for Twilio transport", async () => {
1485-vi.stubEnv("TWILIO_ACCOUNT_SID", "AC123");
1486-vi.stubEnv("TWILIO_AUTH_TOKEN", "secret");
1487-vi.stubEnv("TWILIO_FROM_NUMBER", "+15550001234");
1488-const { tools } = setup(
1489-{ defaultTransport: "twilio" },
1490-{
1491-fullConfig: {
1492-plugins: {
1493-allow: ["google-meet", "voice-call"],
1494-entries: {
1495-"voice-call": {
1496-enabled: true,
1497-config: {
1498-provider: "twilio",
1499-publicUrl: "http://127.0.0.1:3334/voice/webhook",
1488+it.each([
1489+"http://127.0.0.1:3334/voice/webhook",
1490+"http://[::1]:3334/voice/webhook",
1491+"http://[fd00::1]/voice/webhook",
1492+])(
1493+"reports local voice-call publicUrl %s as unusable for Twilio transport",
1494+async (publicUrl) => {
1495+vi.stubEnv("TWILIO_ACCOUNT_SID", "AC123");
1496+vi.stubEnv("TWILIO_AUTH_TOKEN", "secret");
1497+vi.stubEnv("TWILIO_FROM_NUMBER", "+15550001234");
1498+const { tools } = setup(
1499+{ defaultTransport: "twilio" },
1500+{
1501+fullConfig: {
1502+plugins: {
1503+allow: ["google-meet", "voice-call"],
1504+entries: {
1505+"voice-call": {
1506+enabled: true,
1507+config: {
1508+provider: "twilio",
1509+ publicUrl,
1510+},
15001511},
15011512},
15021513},
15031514},
15041515},
1505-},
1506-);
1507-const tool = tools[0] as {
1508-execute: (
1509-id: string,
1510-params: unknown,
1511-) => Promise<{ details: { ok?: boolean; checks?: unknown[] } }>;
1512-};
1516+);
1517+const tool = tools[0] as {
1518+execute: (
1519+id: string,
1520+params: unknown,
1521+) => Promise<{ details: { ok?: boolean; checks?: unknown[] } }>;
1522+};
151315231514-const result = await tool.execute("id", { action: "setup_status" });
1524+ const result = await tool.execute("id", { action: "setup_status" });
151515251516-expect(result.details.ok).toBe(false);
1517-expect(result.details.checks).toEqual(
1518-expect.arrayContaining([
1519-expect.objectContaining({
1520-id: "twilio-voice-call-webhook",
1521-ok: false,
1522-}),
1523-]),
1524-);
1525-});
1526+expect(result.details.ok).toBe(false);
1527+expect(result.details.checks).toEqual(
1528+expect.arrayContaining([
1529+expect.objectContaining({
1530+id: "twilio-voice-call-webhook",
1531+ok: false,
1532+}),
1533+]),
1534+);
1535+},
1536+);
1526153715271538it("opens local Chrome Meet in observe-only mode without BlackHole checks", async () => {
15281539const originalPlatform = process.platform;
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。