Skip to content

Commit 16f130f

Browse files
committed
fix(integ-runner): improve git directory handling for snapshot operations
Fixes issues with git operations by using the -C flag to specify the correct git repository directory. This ensures integ-runner works correctly when executed from outside the repository under test. Also standardizes the directory used for running CDK apps to always be the current working directory.
1 parent b548d5d commit 16f130f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/@aws-cdk/integ-runner/test/runner/integration-tests.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,13 @@ describe('IntegrationTests Discovery', () => {
138138
expect(integTests[2].fileName).toEqual(expect.stringMatching(new RegExp('^.*test3\\.js$')));
139139
});
140140
});
141+
142+
describe('IntegTest directory is always cwd', () => {
143+
test('directory is set to process.cwd()', async () => {
144+
const integTests = await tests.fromCliOptions({ language: ['javascript'] });
145+
146+
expect(integTests.length).toBeGreaterThan(0);
147+
expect(integTests[0].directory).toEqual(process.cwd());
148+
});
149+
});
141150
});

0 commit comments

Comments
 (0)