mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 20:46:57 +02:00
test: align planner explain output with execution
This commit is contained in:
@@ -248,6 +248,18 @@ describe("scripts/test-parallel lane planning", () => {
|
||||
).toThrowError(/Unsupported test profile "macmini"/u);
|
||||
});
|
||||
|
||||
it("rejects unknown explicit surface names", () => {
|
||||
const repoRoot = path.resolve(import.meta.dirname, "../..");
|
||||
|
||||
expect(() =>
|
||||
execFileSync("node", ["scripts/test-parallel.mjs", "--plan", "--surface", "channel"], {
|
||||
cwd: repoRoot,
|
||||
env: process.env,
|
||||
encoding: "utf8",
|
||||
}),
|
||||
).toThrowError(/Unsupported --surface value\(s\): channel/u);
|
||||
});
|
||||
|
||||
it("rejects wrapper --files values that look like options", () => {
|
||||
const repoRoot = path.resolve(import.meta.dirname, "../..");
|
||||
|
||||
|
||||
@@ -110,4 +110,21 @@ describe("test planner", () => {
|
||||
expect(explanation.reasons).toContain("base-pinned-manifest");
|
||||
expect(explanation.intentProfile).toBe("normal");
|
||||
});
|
||||
|
||||
it("uses hotspot-backed memory isolation when explaining unit tests", () => {
|
||||
const explanation = explainExecutionTarget(
|
||||
{
|
||||
mode: "local",
|
||||
fileFilters: ["src/infra/outbound/targets.channel-resolution.test.ts"],
|
||||
},
|
||||
{
|
||||
env: {
|
||||
OPENCLAW_TEST_LOAD_AWARE: "0",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
expect(explanation.isolate).toBe(true);
|
||||
expect(explanation.reasons).toContain("unit-memory-isolated");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user