mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
test: use synthetic heartbeat wake fixtures
This commit is contained in:
@@ -262,7 +262,7 @@ describe("heartbeat-wake", () => {
|
||||
requestHeartbeatNow({
|
||||
reason: "cron:job-1",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
heartbeat: { target: "last" },
|
||||
coalesceMs: 0,
|
||||
});
|
||||
@@ -272,7 +272,7 @@ describe("heartbeat-wake", () => {
|
||||
expect(handler.mock.calls[0]?.[0]).toEqual({
|
||||
reason: "cron:job-1",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
heartbeat: { target: "last" },
|
||||
});
|
||||
|
||||
@@ -281,7 +281,7 @@ describe("heartbeat-wake", () => {
|
||||
expect(handler.mock.calls[1]?.[0]).toEqual({
|
||||
reason: "cron:job-1",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
heartbeat: { target: "last" },
|
||||
});
|
||||
});
|
||||
@@ -294,14 +294,14 @@ describe("heartbeat-wake", () => {
|
||||
requestHeartbeatNow({
|
||||
reason: "manual",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
heartbeat: { target: "last" },
|
||||
coalesceMs: 100,
|
||||
});
|
||||
requestHeartbeatNow({
|
||||
reason: "manual",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
coalesceMs: 100,
|
||||
});
|
||||
|
||||
@@ -311,7 +311,7 @@ describe("heartbeat-wake", () => {
|
||||
expect(handler).toHaveBeenCalledWith({
|
||||
reason: "manual",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
heartbeat: { target: "last" },
|
||||
});
|
||||
});
|
||||
@@ -324,13 +324,13 @@ describe("heartbeat-wake", () => {
|
||||
requestHeartbeatNow({
|
||||
reason: "cron:job-a",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
coalesceMs: 100,
|
||||
});
|
||||
requestHeartbeatNow({
|
||||
reason: "cron:job-b",
|
||||
agentId: "main",
|
||||
sessionKey: "agent:main:telegram:group:-1001",
|
||||
sessionKey: "agent:main:forum:group:-1001",
|
||||
coalesceMs: 100,
|
||||
});
|
||||
|
||||
@@ -342,12 +342,12 @@ describe("heartbeat-wake", () => {
|
||||
{
|
||||
reason: "cron:job-a",
|
||||
agentId: "ops",
|
||||
sessionKey: "agent:ops:discord:channel:alerts",
|
||||
sessionKey: "agent:ops:guildchat:channel:alerts",
|
||||
},
|
||||
{
|
||||
reason: "cron:job-b",
|
||||
agentId: "main",
|
||||
sessionKey: "agent:main:telegram:group:-1001",
|
||||
sessionKey: "agent:main:forum:group:-1001",
|
||||
},
|
||||
]),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user