mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
fix(qa): keep direct self-check outputs under repo root
This commit is contained in:
committed by
Peter Steinberger
parent
f6544a0a3b
commit
986536ff6b
@@ -100,6 +100,26 @@ describe("qa-lab server", () => {
|
||||
expect(markdown).toContain("- Status: pass");
|
||||
});
|
||||
|
||||
it("anchors direct self-check runs under the explicit repo root by default", async () => {
|
||||
const repoRoot = await mkdtemp(path.join(os.tmpdir(), "qa-lab-self-check-root-"));
|
||||
cleanups.push(async () => {
|
||||
await rm(repoRoot, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
const lab = await startQaLabServer({
|
||||
host: "127.0.0.1",
|
||||
port: 0,
|
||||
repoRoot,
|
||||
});
|
||||
cleanups.push(async () => {
|
||||
await lab.stop();
|
||||
});
|
||||
|
||||
const result = await lab.runSelfCheck();
|
||||
expect(result.outputPath).toBe(path.join(repoRoot, ".artifacts", "qa-e2e", "self-check.md"));
|
||||
expect(await readFile(result.outputPath, "utf8")).toContain("Synthetic Slack-class roundtrip");
|
||||
});
|
||||
|
||||
it("injects the kickoff task on demand and on startup", async () => {
|
||||
const autoKickoffLab = await startQaLabServer({
|
||||
host: "127.0.0.1",
|
||||
|
||||
@@ -855,6 +855,7 @@ export async function startQaLabServer(params?: {
|
||||
state,
|
||||
cfg: gateway?.cfg ?? createQaLabConfig(listenUrl),
|
||||
outputPath: params?.outputPath,
|
||||
repoRoot,
|
||||
});
|
||||
latestScenarioRun = withQaLabRunCounts({
|
||||
kind: "self-check",
|
||||
|
||||
Reference in New Issue
Block a user