-
Couldn't load subscription status.
- Fork 51
fix(integ-runner): inconsistent and unexpected CWD in test app execution #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #720 +/- ##
==========================================
- Coverage 79.52% 79.47% -0.05%
==========================================
Files 50 51 +1
Lines 7291 7294 +3
Branches 826 824 -2
==========================================
- Hits 5798 5797 -1
- Misses 1474 1478 +4
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull request was converted to draft
…ions 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.
10a4550 to
d83463b
Compare
Fixes an issue with the CWD being inconsistent and unexpected during execution of the test app. Previously we had two different behaviors: For regular execution we would execute the app from the directory of the test file, but for watch we would run it in the actual user's CWD. This is inconsistent behavior making it difficult to write integ test cases than can be executed across all modes. Additionally as reported in #638, languages likes python may rely on CWD to import modules. The CWD changing compared to library code and modes, makes it very difficult to use integ-runner in these languages.
The change aligns the CWD for test app execution to be the current CWD. Given the two existing choices, this is the less arbitrary one and aligns more with running a test app directly (
node integ.app-under-test.test.js) would work.Related to the above change, git operations are now using the -C flag to specify the correct git repository directory instead of the CWD. This ensures integ-runner works correctly even when executed from outside the repository under test. Previously this worked because we change the working directory to the directory containing the test file. However in the error case this printed an incorrect reproduction command that assumed the repro would be run that directory.
Fixes #638
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license