Update shell service integration tests (#6598)

This commit is contained in:
Gal Zahavi 2025-08-19 18:24:42 -07:00 committed by GitHub
parent 2a71c10b8a
commit c93c06711a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 5 deletions

View File

@ -16,7 +16,7 @@ describe('ShellExecutionService programmatic integration tests', () => {
beforeAll(async () => {
// Create a dedicated directory for this test suite to avoid conflicts.
testDir = path.join(
process.env.INTEGRATION_TEST_FILE_DIR!,
process.env['INTEGRATION_TEST_FILE_DIR']!,
'shell-service-tests',
);
await fs.mkdir(testDir, { recursive: true });
@ -27,11 +27,12 @@ describe('ShellExecutionService programmatic integration tests', () => {
const onOutputEvent = vi.fn();
const abortController = new AbortController();
const handle = ShellExecutionService.execute(
const handle = await ShellExecutionService.execute(
command,
testDir,
onOutputEvent,
abortController.signal,
false,
);
const result = await handle.result;
@ -52,11 +53,12 @@ describe('ShellExecutionService programmatic integration tests', () => {
const onOutputEvent = vi.fn();
const abortController = new AbortController();
const handle = ShellExecutionService.execute(
const handle = await ShellExecutionService.execute(
command,
testDir,
onOutputEvent,
abortController.signal,
false,
);
const result = await handle.result;
@ -77,11 +79,12 @@ describe('ShellExecutionService programmatic integration tests', () => {
const onOutputEvent = vi.fn();
const abortController = new AbortController();
const handle = ShellExecutionService.execute(
const handle = await ShellExecutionService.execute(
command,
testDir,
onOutputEvent,
abortController.signal,
false,
);
const result = await handle.result;
@ -98,11 +101,12 @@ describe('ShellExecutionService programmatic integration tests', () => {
const onOutputEvent = vi.fn();
const abortController = new AbortController();
const handle = ShellExecutionService.execute(
const handle = await ShellExecutionService.execute(
command,
testDir,
onOutputEvent,
abortController.signal,
false,
);
// Abort shortly after starting