test: use synthetic heartbeat wake fixtures

This commit is contained in:
Peter Steinberger
2026-04-21 00:50:16 +01:00
parent 25428c4631
commit 05835dd2d4

View File

@@ -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",
},
]),
);