mirror of https://github.com/openclaw/openclaw.git
perf(test): fold doctor legacy migration harness cases
This commit is contained in:
parent
ea07d3fdd8
commit
aa1e4962da
|
|
@ -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);
|
||||
});
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue