mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
fix: mark accepted Mantis remote runs
This commit is contained in:
@@ -472,10 +472,16 @@ describe("mantis Slack desktop smoke runtime", () => {
|
||||
expect(result.status).toBe("pass");
|
||||
const summary = JSON.parse(await fs.readFile(result.summaryPath, "utf8")) as {
|
||||
status: string;
|
||||
timings: { phases: { name: string; status: string }[] };
|
||||
warning?: string;
|
||||
};
|
||||
expect(summary.status).toBe("pass");
|
||||
expect(summary.warning).toBeUndefined();
|
||||
expect(summary.timings.phases).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({ name: "crabbox.remote_run", status: "accepted" }),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("copies the screenshot before reporting a failed remote Slack QA run", async () => {
|
||||
|
||||
@@ -113,7 +113,7 @@ type MantisPhaseTiming = {
|
||||
finishedAt: string;
|
||||
name: string;
|
||||
startedAt: string;
|
||||
status: "fail" | "pass";
|
||||
status: "accepted" | "fail" | "pass";
|
||||
};
|
||||
|
||||
type MantisPhaseTimings = {
|
||||
@@ -203,7 +203,13 @@ function createPhaseTimer(startedAt: Date) {
|
||||
totalMs: now.getTime() - origin,
|
||||
};
|
||||
}
|
||||
return { recordPhase, snapshot, timePhase };
|
||||
function updatePhaseStatus(name: string, status: MantisPhaseTiming["status"]) {
|
||||
const phase = phases.findLast((entry) => entry.name === name);
|
||||
if (phase) {
|
||||
phase.status = status;
|
||||
}
|
||||
}
|
||||
return { recordPhase, snapshot, timePhase, updatePhaseStatus };
|
||||
}
|
||||
|
||||
function defaultOutputDir(repoRoot: string, startedAt: Date) {
|
||||
@@ -1034,6 +1040,9 @@ export async function runMantisSlackDesktopSmoke(
|
||||
}
|
||||
const gatewaySetupCompleted =
|
||||
gatewaySetup && remoteMetadata?.qaExitCode === 0 && remoteMetadata.gatewayAlive === true;
|
||||
if (remoteRunError && gatewaySetupCompleted) {
|
||||
timer.updatePhaseStatus("crabbox.remote_run", "accepted");
|
||||
}
|
||||
if (remoteRunError && !gatewaySetupCompleted) {
|
||||
throw remoteRunError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user