mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: verify plugin warning messages
This commit is contained in:
@@ -909,7 +909,7 @@ describe("drive.notice.comment_add_v1 monitor handler", () => {
|
||||
"default",
|
||||
);
|
||||
expect(lastRuntime?.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("error handling drive comment notice: Error: post-send failure"),
|
||||
"feishu[default]: error handling drive comment notice: Error: post-send failure",
|
||||
);
|
||||
});
|
||||
const [recordedMessageId, recordedNamespace, recordedLogger] =
|
||||
@@ -936,9 +936,7 @@ describe("drive.notice.comment_add_v1 monitor handler", () => {
|
||||
"default",
|
||||
);
|
||||
expect(lastRuntime?.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"error handling drive comment notice: FeishuRetryableSyntheticEventError: retry me",
|
||||
),
|
||||
"feishu[default]: error handling drive comment notice: FeishuRetryableSyntheticEventError: retry me",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -123,16 +123,23 @@ describe("irc inbound behavior", () => {
|
||||
expect(sendReply).toHaveBeenCalledTimes(1);
|
||||
expect(sendReply).toHaveBeenCalledWith(
|
||||
"alice",
|
||||
expect.stringContaining("OpenClaw: access not configured."),
|
||||
[
|
||||
"OpenClaw: access not configured.",
|
||||
"",
|
||||
"Your IRC id: alice!ident@example.com",
|
||||
"Pairing code:",
|
||||
"```",
|
||||
"CODE",
|
||||
"```",
|
||||
"",
|
||||
"Ask the bot owner to approve with:",
|
||||
"openclaw pairing approve irc CODE",
|
||||
"```",
|
||||
"openclaw pairing approve irc CODE",
|
||||
"```",
|
||||
].join("\n"),
|
||||
undefined,
|
||||
);
|
||||
expect(sendReply).toHaveBeenCalledWith(
|
||||
"alice",
|
||||
expect.stringContaining("Your IRC id: alice!ident@example.com"),
|
||||
undefined,
|
||||
);
|
||||
const replyMessages = sendReply.mock.calls.map((call) => call[1]);
|
||||
expect(replyMessages.some((message) => message.includes("CODE"))).toBe(true);
|
||||
});
|
||||
|
||||
it("drops unauthorized group control commands before dispatch", async () => {
|
||||
|
||||
@@ -142,7 +142,7 @@ describe("runMatrixStartupMaintenance", () => {
|
||||
|
||||
expectWarningOnlyMaintenanceSkipped(harness);
|
||||
expect(harness.log.warn).toHaveBeenCalledWith(
|
||||
expect.stringContaining("could not be resolved yet"),
|
||||
`matrix: Legacy Matrix state detected at ${path.join(home, ".openclaw", "matrix")}, but the new account-scoped target could not be resolved yet (need homeserver, userId, and access token for channels.matrix). Start the gateway once with a working Matrix login, or rerun "openclaw doctor --fix" after cached credentials are available.`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user