mirror of
https://github.com/morluto/rea.git
synced 2026-11-12 17:59:08 +00:00
fix(ci): restore lifecycle ownership coverage (#10147)
* fix(process): retain CLI input cleanup ownership * test(ci): align lifecycle fixtures with typed ownership contracts --------- Co-authored-by: Nianze Wu <wunianze666@gmail.com>
This commit is contained in:
1 parent
4505477903
commit
6b2f991808
19 files changed
+232
-95
No files matched your search
@@ -8,6 +8,7 @@ import { expect, it, onTestFinished } from "vitest";
|
||||
import { createDarwinProcessRunTokenReader } from "../../src/process/DarwinProcessRunTokenReader.js";
|
||||
import { createSystemProcessOwnershipHost } from "../../src/process/ProcessOwnershipObservation.js";
|
||||
import { startProcessSampler } from "../../src/process/capture/ProcessSampling.js";
|
||||
import { ProcessOwnershipInspectionCancelled } from "../../src/process/ProcessInspectionCancellation.js";
|
||||
|
||||
const waitForFile = async (path: string, timeoutMs = 4_000): Promise<void> => {
|
||||
const deadline = Date.now() + timeoutMs;
|
||||
@@ -112,7 +113,9 @@ const expectOwnedCommandToFinishOnAbort = async (
|
||||
|
||||
if (!(failure instanceof Error))
|
||||
throw new Error("The cancelled process command did not return an error");
|
||||
expect(failure.cause).toBe(reason);
|
||||
expect(ProcessOwnershipInspectionCancelled.from(failure)?.reason).toBe(
|
||||
reason,
|
||||
);
|
||||
await expect(readFile(command.donePath, "utf8")).resolves.toBe("done");
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user