fix: 修正 CaseRun HWPOD 合同复核
This commit is contained in:
@@ -204,7 +204,7 @@ test("case run exposes Keil hex and axf artifacts in evidence summary", () => {
|
||||
|
||||
test("case run normalizes v0.3 HWPOD build operation topology and typed wait blockers", () => {
|
||||
const document = { metadata: { name: "d601-f103-v2" }, spec: { nodeBinding: { nodeId: "node-d601-f103-v2" }, workspace: { path: "F:\\Work\\case" } } };
|
||||
const operation = summarizeHwpodOperationForTest({ body: { hwpodId: "d601-f103-v2", nodeId: "node-d601-f103-v2", results: [{ opId: "op_build", op: "debug.build", ok: true, status: "completed", output: { stdout: '{"job_id":"job-1"}' } }] } }, document, "debug.build");
|
||||
const operation = summarizeHwpodOperationForTest({ body: { hwpodId: "d601-f103-v2", nodeId: "node-d601-f103-v2", results: [{ opId: "op_build", op: "debug.build", ok: true, status: "completed", workspacePath: "F:\\Work\\case", output: { stdout: '{"job_id":"job-1"}' } }] } }, document, "debug.build");
|
||||
assert.equal(operation.topology.ok, true);
|
||||
assert.equal(operation.jobId, "job-1");
|
||||
assert.equal(buildWaitBlockerForTest(operation, { ok: true, status: "completed", warningCount: 7, artifacts: ["F:\\out.hex"] }, 0), null);
|
||||
@@ -214,6 +214,14 @@ test("case run normalizes v0.3 HWPOD build operation topology and typed wait blo
|
||||
assert.equal(buildWaitBlockerForTest(operation, { ok: true, status: "completed", artifacts: ["F:\\out.axf"] }, 0).code, "hwpod_build_hex_missing");
|
||||
const mismatch = summarizeHwpodOperationForTest({ body: { nodeId: "wrong-node", results: [{ op: "debug.build", ok: true, output: { stdout: '{"job_id":"job-2"}' } }] } }, document, "debug.build");
|
||||
assert.equal(buildWaitBlockerForTest(mismatch, null, 0).code, "hwpod_topology_mismatch");
|
||||
const missingObserved = summarizeHwpodOperationForTest({ body: { results: [{ op: "debug.build", ok: true, output: { stdout: '{"job_id":"job-3"}' } }] } }, document, "debug.build");
|
||||
assert.deepEqual(missingObserved.topology.blocker.details, [
|
||||
{ field: "hwpodId", expected: "d601-f103-v2", observed: null },
|
||||
{ field: "nodeId", expected: "node-d601-f103-v2", observed: null },
|
||||
{ field: "workspacePath", expected: "F:\\Work\\case", observed: null }
|
||||
]);
|
||||
const yamlEmpty = summarizeHwpodOperationForTest({ body: { hwpodId: "response-only", nodeId: "response-node", results: [{ op: "debug.build", ok: true, workspacePath: "response-path", output: { stdout: '{"job_id":"job-4"}' } }] } }, { metadata: {}, spec: {} }, "debug.build");
|
||||
assert.equal(yamlEmpty.topology.ok, true);
|
||||
});
|
||||
|
||||
test("case run start returns immediately and status/result/logs are short polling commands", async () => {
|
||||
|
||||
Reference in New Issue
Block a user