test(ci): stabilize release validation flakes

This commit is contained in:
Peter Steinberger
2026-04-28 23:10:30 +01:00
parent eb970bdb42
commit e583db63c6
2 changed files with 14 additions and 2 deletions

View File

@@ -431,6 +431,16 @@ describe("registerPreActionHooks", () => {
expect(ensurePluginRegistryLoadedMock).not.toHaveBeenCalled();
});
it("does not preload plugins for remote agent JSON output", async () => {
await runPreAction({
parseArgv: ["agent"],
processArgv: ["node", "openclaw", "agent", "--message", "hi", "--json"],
});
expect(routeLogsToStderrMock).toHaveBeenCalledOnce();
expect(ensurePluginRegistryLoadedMock).not.toHaveBeenCalled();
});
it("bypasses config guard for config validate", async () => {
await runPreAction({
parseArgv: ["config", "validate"],
@@ -475,7 +485,7 @@ describe("registerPreActionHooks", () => {
await runPreAction({
parseArgv: ["agent"],
processArgv: ["node", "openclaw", "agent", "--message", "hi", "--json"],
processArgv: ["node", "openclaw", "agent", "--local", "--message", "hi", "--json"],
});
expect(ensurePluginRegistryLoadedMock).toHaveBeenCalled();