Skip to content
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

Test in ExtractCommandTests does not write files to the project directory #37395

Closed
wants to merge 1 commit into from

Conversation

erichaagdev
Copy link
Contributor

This change fixes the ExtractCommandTests#runWithJarFileThatWouldWriteEntriesOutsideDestinationFails test to not write files to the project directory. This could cause issues with Gradle caching and up-to-date checks because some tasks depend on the project directory as an input (for example Checkstyle). See below:

image

To address this, I mocked the working directory to a temporary directory like all the other tests in this class.

Prior to this change, this test would create files in the project
directory. This can cause issues with Gradle caching and up-to-date
checks.

To address this, the value of the working directory is mocked to a
temporary directory like all the other tests.
@erichaagdev erichaagdev changed the title Test in ExtractCommandTests writes files to the project directory Test in ExtractCommandTests does not write files to the project directory Sep 14, 2023
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 14, 2023
@wilkinsona wilkinsona added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 15, 2023
@wilkinsona wilkinsona added this to the 2.7.x milestone Sep 15, 2023
@wilkinsona wilkinsona self-assigned this Sep 15, 2023
@philwebb philwebb changed the title Test in ExtractCommandTests does not write files to the project directory Test in ExtractCommandTests does not write files to the project directory Sep 18, 2023
@wilkinsona wilkinsona modified the milestones: 2.7.x, 2.7.17 Sep 22, 2023
wilkinsona pushed a commit that referenced this pull request Sep 22, 2023
Prior to this change, this test would create files in the project
directory. This can cause issues with Gradle caching and up-to-date
checks.

To address this, the value of the working directory is mocked to a
temporary directory like all the other tests.

See gh-37395
@wilkinsona
Copy link
Member

Thanks very much, @erichaagdev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants