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

__files created by default since v3.6.0 #2739

Closed
jkmcl opened this issue May 25, 2024 · 1 comment
Closed

__files created by default since v3.6.0 #2739

jkmcl opened this issue May 25, 2024 · 1 comment
Assignees
Labels

Comments

@jkmcl
Copy link

jkmcl commented May 25, 2024

Proposal

Directory src/test/resources/__files does not exist in my project but I notice that WireMock is creating it automatically after upgrading to version v3.6.0.

I think this should not be the default behavior.

Reproduction steps

Create a project that uses WireMock 3.6.0 but does not use any of its API that requires the existence of __files. Run some test that uses WireMock and an empty src/test/resources/__files will be created.

References

It seems that this undesired behavior is introduced by commit 3be4a18.

@jkmcl jkmcl added the bug label May 25, 2024
@chrisgleissner
Copy link

chrisgleissner commented Jun 6, 2024

Same here. Until this is fixed, I am using the following work-around on a Gradle project. This effectively disables using file-based stubs as it tries to source them from the temporary build folder, but that's fine for my use case.

val wireMockServer = WireMockServer(options().port(0).usingFilesUnderDirectory("build"))

@tomakehurst tomakehurst self-assigned this Jun 18, 2024
tomakehurst added a commit that referenced this issue Jun 18, 2024
…ation

Fixed #2739 - prevent automatic creation of __files dir on startup and instead create lazily on write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants