-
-
Notifications
You must be signed in to change notification settings - Fork 403
[skip-changelog] Set test environment directory as CLI WorkingDir #1886
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
[skip-changelog] Set test environment directory as CLI WorkingDir #1886
Conversation
Once you change the working directory we cannot start anymore the cli from a relative path like ArduinoCLIPath: FindRepositoryRootPath(t).Join("arduino-cli"), probably the best way forward is to let |
26063d9
to
019d971
Compare
By default, the working directory is the one containing the test.go file. This causes problems when executing commands that have to create files specifically in the working directory, because they either must be deleted manually or the user has to be aware of it and defer a deleting instruction. Furthermore, it messes with tests using relative paths. Setting the environment directory as the CLI's WorkingDir prevents the above mentioned issues from occurring.
019d971
to
6e8e167
Compare
Codecov ReportBase: 36.58% // Head: 36.66% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1886 +/- ##
==========================================
+ Coverage 36.58% 36.66% +0.08%
==========================================
Files 231 231
Lines 19696 19702 +6
==========================================
+ Hits 7206 7224 +18
+ Misses 11659 11650 -9
+ Partials 831 828 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
It should be fixed now. Thanks for the suggestion! |
6e8e167
to
12ea44c
Compare
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)What kind of change does this PR introduce?
Infrastructure Enhancement
What is the new behavior?
By default, the working directory is the one containing the test.go file. This causes problems when executing commands that have to create files specifically in the working directory, because they either must be deleted manually or the user has to be aware of it and defer a deleting instruction. Furthermore, it messes with tests using relative paths. Setting the environment directory as the CLI's WorkingDir prevents the above mentioned issues from occurring.
Does this PR introduce a breaking change, and is titled accordingly?
No
See how to contribute