mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
feat(qa): recreate qa lab docker stack
This commit is contained in:
@@ -23,6 +23,13 @@ const { nodesAction, registerNodesCli } = vi.hoisted(() => {
|
||||
return { nodesAction: action, registerNodesCli: register };
|
||||
});
|
||||
|
||||
const { registerQaCli } = vi.hoisted(() => ({
|
||||
registerQaCli: vi.fn((program: Command) => {
|
||||
const qa = program.command("qa");
|
||||
qa.command("run").action(() => undefined);
|
||||
}),
|
||||
}));
|
||||
|
||||
const configModule = vi.hoisted(() => ({
|
||||
loadConfig: vi.fn(),
|
||||
readConfigFileSnapshot: vi.fn(),
|
||||
@@ -30,6 +37,7 @@ const configModule = vi.hoisted(() => ({
|
||||
|
||||
vi.mock("../acp-cli.js", () => ({ registerAcpCli }));
|
||||
vi.mock("../nodes-cli.js", () => ({ registerNodesCli }));
|
||||
vi.mock("../qa-cli.js", () => ({ registerQaCli }));
|
||||
vi.mock("../../config/config.js", () => configModule);
|
||||
|
||||
describe("registerSubCliCommands", () => {
|
||||
@@ -87,6 +95,7 @@ describe("registerSubCliCommands", () => {
|
||||
expect(names).toContain("acp");
|
||||
expect(names).toContain("gateway");
|
||||
expect(names).toContain("clawbot");
|
||||
expect(names).toContain("qa");
|
||||
expect(registerAcpCli).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
@@ -181,6 +181,15 @@ const entries: SubCliEntry[] = [
|
||||
mod.registerDocsCli(program);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "qa",
|
||||
description: "Run QA scenarios and launch the private QA debugger UI",
|
||||
hasSubcommands: true,
|
||||
register: async (program) => {
|
||||
const mod = await import("../qa-cli.js");
|
||||
mod.registerQaCli(program);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "hooks",
|
||||
description: "Manage internal agent hooks",
|
||||
|
||||
@@ -68,6 +68,11 @@ export const SUB_CLI_DESCRIPTORS = [
|
||||
description: "Search the live OpenClaw docs",
|
||||
hasSubcommands: false,
|
||||
},
|
||||
{
|
||||
name: "qa",
|
||||
description: "Run QA scenarios and launch the private QA debugger UI",
|
||||
hasSubcommands: true,
|
||||
},
|
||||
{
|
||||
name: "hooks",
|
||||
description: "Manage internal agent hooks",
|
||||
|
||||
Reference in New Issue
Block a user