mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:21:23 +00:00
perf(test): fold doctor legacy migration harness cases
This commit is contained in:
@@ -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();
|
expect(confirm).not.toHaveBeenCalled();
|
||||||
}, 30_000);
|
}, 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 () => {
|
it("skips gateway restarts in non-interactive mode", async () => {
|
||||||
readConfigFileSnapshot.mockResolvedValue({
|
readConfigFileSnapshot.mockResolvedValue({
|
||||||
path: "/tmp/openclaw.json",
|
path: "/tmp/openclaw.json",
|
||||||
|
|||||||
Reference in New Issue
Block a user