test(process): use deterministic hang fixture
This commit is contained in:
@@ -702,17 +702,17 @@ describe("process capture adapter", () => {
|
|||||||
if (!capability.available) return;
|
if (!capability.available) return;
|
||||||
const policy: ProcessExecutionPolicy = {
|
const policy: ProcessExecutionPolicy = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
executableRoots: ["/bin"],
|
executableRoots: [dirname(process.execPath)],
|
||||||
workingRoots: ["/tmp"],
|
workingRoots: [dirname(processFixture)],
|
||||||
allowedEnvironment: [],
|
allowedEnvironment: [],
|
||||||
allowExternalNetwork: true,
|
allowExternalNetwork: true,
|
||||||
};
|
};
|
||||||
const timedOut = await captureProcessScenario(
|
const timedOut = await captureProcessScenario(
|
||||||
parseProcessScenario({
|
parseProcessScenario({
|
||||||
approved: true,
|
approved: true,
|
||||||
executable: "/bin/sh",
|
executable: process.execPath,
|
||||||
arguments: ["-c", "sleep 5"],
|
arguments: [processFixture, "hang"],
|
||||||
working_directory: "/tmp",
|
working_directory: dirname(processFixture),
|
||||||
timeout_ms: 50,
|
timeout_ms: 50,
|
||||||
idle_timeout_ms: 5_000,
|
idle_timeout_ms: 5_000,
|
||||||
}),
|
}),
|
||||||
@@ -731,9 +731,9 @@ describe("process capture adapter", () => {
|
|||||||
const cancelled = await captureProcessScenario(
|
const cancelled = await captureProcessScenario(
|
||||||
parseProcessScenario({
|
parseProcessScenario({
|
||||||
approved: true,
|
approved: true,
|
||||||
executable: "/bin/sh",
|
executable: process.execPath,
|
||||||
arguments: ["-c", "sleep 5"],
|
arguments: [processFixture, "hang"],
|
||||||
working_directory: "/tmp",
|
working_directory: dirname(processFixture),
|
||||||
timeout_ms: 5_000,
|
timeout_ms: 5_000,
|
||||||
idle_timeout_ms: 5_000,
|
idle_timeout_ms: 5_000,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user