-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
WithWatchStaticMappings doesn't respect new files #1188
Comments
Sounds familiar. Related to this?
|
If that's the correct use then no dice - mappings are still empty.
|
Mmm.
The only thing I can build is a simple polling to a new rest endpoint like |
@mantasburokas (Make sure to delete your local ":latest" image for WireMock.Net) Note that I only tested on windows. |
I have deleted all existing images and containers, upgraded the package but still no mappings. Added a breakpoint on CopyAsync to observe if maybe mappings appear after some delay but they don't. I also ran the unit tests on windows. |
Ah sorry I misunderstood your question. .WithMappings($"{AppDomain.CurrentDomain.BaseDirectory}Mappings") This has been solved in the preview version. BTW, when running on windows and using a windows container, the second argument should be |
Yeah, but I am running on windows for local setup and using linux containers. So just to re-iterate, the problem is that WithMappings() works as expected on local setup but in docker in docker configuration I can't mount the path from parent container. That's why I'd like to copy the mappings directory by hand and expect the watch flag to pick it up. |
Can you give an example how you use these multiple docker containers? |
I can prepare a test solution but I am bit busy this week. Basically I have dockerfile that runs my tests and since my tests run in docker then wiremock becomes a docker in docker setup. |
What happens when you just go into the WireMock.Net container and |
Please test new version: 1.6.7-preview-02 (make sure to delete the all local versions to be sure you get the latest) And I noticed that when using CopyAsync in a Windows Container, I get error:
|
@mantasburokas did you have time to test that version? |
1 similar comment
@mantasburokas did you have time to test that version? |
Describe the bug
"--WatchStaticMappings true" command doesn't respect new files copied. This is a bit annoying in docker in docker configuration where I can't bind mappings using WithMappings() as docker bind always references the host and not the parent container.
Expected behavior:
On new file copy static mappings are read.
Test to reproduce
Check mappings or make request
Other related info
Workaround exists using admin client:
await _wireMockContainer.CreateWireMockAdminClient().ResetMappingsAsync(true);
The text was updated successfully, but these errors were encountered: