mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: tighten gateway runtime assertions
This commit is contained in:
@@ -93,10 +93,8 @@ describe("gateway HTTP request trace scope", () => {
|
||||
.split("\n")
|
||||
.map((line) => JSON.parse(line) as Record<string, unknown>)
|
||||
.find((record) => record.message === "handled request trace");
|
||||
expect(traceRecord).toMatchObject({
|
||||
traceId: activeTraceInHandler?.traceId,
|
||||
spanId: activeTraceInHandler?.spanId,
|
||||
});
|
||||
expect(traceRecord?.traceId).toBe(activeTraceInHandler?.traceId);
|
||||
expect(traceRecord?.spanId).toBe(activeTraceInHandler?.spanId);
|
||||
} finally {
|
||||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
@@ -185,18 +185,16 @@ describe("server-runtime-services", () => {
|
||||
expect(services.heartbeatRunner).toBe(hoisted.heartbeatRunner);
|
||||
await vi.advanceTimersByTimeAsync(1_250);
|
||||
await vi.dynamicImportSettled();
|
||||
expect(hoisted.recoverPendingDeliveries).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
deliver: hoisted.deliverOutboundPayloads,
|
||||
cfg: {},
|
||||
}),
|
||||
);
|
||||
expect(hoisted.recoverPendingRestartContinuationDeliveries).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
deps: {},
|
||||
maxEnqueuedAt: 123,
|
||||
}),
|
||||
);
|
||||
expect(hoisted.recoverPendingDeliveries).toHaveBeenCalledWith({
|
||||
deliver: hoisted.deliverOutboundPayloads,
|
||||
cfg: {},
|
||||
log: expect.any(Object),
|
||||
});
|
||||
expect(hoisted.recoverPendingRestartContinuationDeliveries).toHaveBeenCalledWith({
|
||||
deps: {},
|
||||
maxEnqueuedAt: 123,
|
||||
log: expect.any(Object),
|
||||
});
|
||||
});
|
||||
|
||||
it("can defer cron startup while activating other scheduled services", async () => {
|
||||
|
||||
Reference in New Issue
Block a user