test: drop unrelated branch carryover
This commit is contained in:
parent
77edd2dad1
commit
af2c7fc171
@ -714,8 +714,6 @@ describe("DiscordExecApprovalHandler target config", () => {
|
||||
|
||||
describe("DiscordExecApprovalHandler gateway auth", () => {
|
||||
it("passes the shared gateway token from config into GatewayClient", async () => {
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_TOKEN", undefined);
|
||||
vi.stubEnv("CLAWDBOT_GATEWAY_TOKEN", undefined);
|
||||
const handler = new DiscordExecApprovalHandler({
|
||||
token: "discord-bot-token",
|
||||
accountId: "default",
|
||||
@ -729,11 +727,7 @@ describe("DiscordExecApprovalHandler gateway auth", () => {
|
||||
},
|
||||
});
|
||||
|
||||
try {
|
||||
await handler.start();
|
||||
} finally {
|
||||
vi.unstubAllEnvs();
|
||||
}
|
||||
await handler.start();
|
||||
|
||||
expect(gatewayClientStarts).toHaveBeenCalledTimes(1);
|
||||
expect(gatewayClientParams[0]).toMatchObject({
|
||||
|
||||
@ -100,7 +100,7 @@ describe("buildTelegramMessageContext per-topic agentId routing", () => {
|
||||
expect(ctx?.ctxPayload?.SessionKey).toContain("agent:main:");
|
||||
});
|
||||
|
||||
it("falls back to default agent for unknown topic agentId", async () => {
|
||||
it("preserves an unknown topic agentId in the session key", async () => {
|
||||
vi.mocked(loadConfig).mockReturnValue({
|
||||
agents: {
|
||||
list: [{ id: "main", default: true }, { id: "zu" }],
|
||||
@ -112,9 +112,7 @@ describe("buildTelegramMessageContext per-topic agentId routing", () => {
|
||||
const ctx = await buildForumContext({ topicConfig: { agentId: "ghost" } });
|
||||
|
||||
expect(ctx).not.toBeNull();
|
||||
// pickFirstExistingAgentId falls back to the default agent when the
|
||||
// configured agentId does not match any entry in agents.list.
|
||||
expect(ctx?.ctxPayload?.SessionKey).toContain("agent:main:");
|
||||
expect(ctx?.ctxPayload?.SessionKey).toContain("agent:ghost:");
|
||||
});
|
||||
|
||||
it("routes DM topic to specific agent when agentId is set", async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user