perf(test): fold doctor legacy migration harness cases

This commit is contained in:
Peter Steinberger
2026-02-16 01:14:00 +00:00
parent ea07d3fdd8
commit aa1e4962da
2 changed files with 10 additions and 14 deletions

View File

@@ -1,14 +0,0 @@
import { describe, expect, it } from "vitest";
import { arrangeLegacyStateMigrationTest, confirm } from "./doctor.e2e-harness.js";
describe("doctor command", () => {
it("runs legacy state migrations in non-interactive mode without prompting", async () => {
const { doctorCommand, runtime, runLegacyStateMigrations } =
await arrangeLegacyStateMigrationTest();
await doctorCommand(runtime, { nonInteractive: true });
expect(runLegacyStateMigrations).toHaveBeenCalledTimes(1);
expect(confirm).not.toHaveBeenCalled();
}, 30_000);
});

View File

@@ -20,6 +20,16 @@ describe("doctor command", () => {
expect(confirm).not.toHaveBeenCalled();
}, 30_000);
it("runs legacy state migrations in non-interactive mode without prompting", async () => {
const { doctorCommand, runtime, runLegacyStateMigrations } =
await arrangeLegacyStateMigrationTest();
await doctorCommand(runtime, { nonInteractive: true });
expect(runLegacyStateMigrations).toHaveBeenCalledTimes(1);
expect(confirm).not.toHaveBeenCalled();
}, 30_000);
it("skips gateway restarts in non-interactive mode", async () => {
readConfigFileSnapshot.mockResolvedValue({
path: "/tmp/openclaw.json",