fix(process): derive executable names from the capture host (#1108)
This commit is contained in:
@@ -6,6 +6,30 @@ import { parseProcessScenario } from "../../../src/domain/process/processScenari
|
||||
import { createProcessCaptureEvidence } from "../../../src/application/process/ProcessEvidence.js";
|
||||
import { observeSettlement } from "../../../src/process/capture/ProcessCaptureLifecycle.js";
|
||||
|
||||
it.each([
|
||||
["win32", "program.exe"],
|
||||
["linux", "directory\\program.exe"],
|
||||
["darwin", "directory\\program.exe"],
|
||||
] as const)(
|
||||
"interprets the executable name using the captured %s host",
|
||||
(platform, expectedName) => {
|
||||
const scenario = parseProcessScenario({
|
||||
executable: "/fixtures/directory\\program.exe",
|
||||
working_directory: process.cwd(),
|
||||
events: [],
|
||||
});
|
||||
const base = emptyUnverifiedProcessCapture();
|
||||
const capture = parseProcessCapture({
|
||||
...base,
|
||||
manifest: { ...base.manifest, platform },
|
||||
});
|
||||
expect(
|
||||
createProcessCaptureEvidence(scenario, capture).parameters
|
||||
.executable_name,
|
||||
).toBe(expectedName);
|
||||
},
|
||||
);
|
||||
|
||||
it("stamps process Evidence from the capture manifest host", () => {
|
||||
const scenario = parseProcessScenario({
|
||||
executable: process.execPath,
|
||||
|
||||
Reference in New Issue
Block a user