mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-17 02:37:33 +00:00
fix: reread config on in-process gateway restart (#80161)
* fix: reread config on in-process gateway restart * fix: refresh swift protocol model
This commit is contained in:
committed by
Peter Steinberger
parent
50f229c0f6
commit
537bcada37
@@ -319,6 +319,41 @@ describe("gateway run option collisions", () => {
|
||||
expect(secondOptions.startupStartedAt).toBe(2000);
|
||||
});
|
||||
|
||||
it("uses the startup snapshot only for the first in-process gateway start", async () => {
|
||||
runGatewayLoop.mockImplementationOnce(async ({ start }: { start: GatewayLoopStart }) => {
|
||||
await start({ startupStartedAt: 1000 });
|
||||
await start({ startupStartedAt: 2000 });
|
||||
});
|
||||
|
||||
await runGatewayCli(["gateway", "run", "--allow-unconfigured"]);
|
||||
|
||||
expect(startGatewayServer).toHaveBeenCalledTimes(2);
|
||||
expect(startGatewayServer).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
18789,
|
||||
expect.objectContaining({
|
||||
startupStartedAt: 1000,
|
||||
startupConfigSnapshotRead: {
|
||||
snapshot: configState.snapshot,
|
||||
},
|
||||
}),
|
||||
);
|
||||
expect(startGatewayServer).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
18789,
|
||||
expect.not.objectContaining({
|
||||
startupConfigSnapshotRead: expect.anything(),
|
||||
}),
|
||||
);
|
||||
expect(startGatewayServer).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
18789,
|
||||
expect.objectContaining({
|
||||
startupStartedAt: 2000,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("logs when first startup will build missing Control UI assets", async () => {
|
||||
controlUiState.root = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user