.WithMappings to mount volume is not working for GRPC #679

Closed
opened 2025-12-29 15:30:44 +01:00 by adam · 2 comments
Owner

Originally created by @GomesNayagam on GitHub (Apr 11, 2025).

Originally assigned to: @StefH on GitHub.

Hi @StefH

            var wireMockContainer = new WireMockContainerBuilder()
                .WithAutoRemove(true)
                .WithCleanUp(true)
                .WithCommand("--UseHttp2")
                .AddUrl("grpc://*:9090")
                .AddUrl("http://*:8080")
                .AddProtoDefinition("my-greeter", protoDefinition)
                .WithMappings(TestHelper.GetAbsolutePath(@"mocks\greet"))
                //.WithWatchStaticMappings(true)
                //.WithBindMount(TestHelper.GetAbsolutePath(@"mocks\greet"), "/home/wiremock")
                .Build();

i have the json files under the path and it is not working. it works with

.WithWatchStaticMappings(true) with CopyAsync

Originally created by @GomesNayagam on GitHub (Apr 11, 2025). Originally assigned to: @StefH on GitHub. Hi @StefH ``` c# var wireMockContainer = new WireMockContainerBuilder() .WithAutoRemove(true) .WithCleanUp(true) .WithCommand("--UseHttp2") .AddUrl("grpc://*:9090") .AddUrl("http://*:8080") .AddProtoDefinition("my-greeter", protoDefinition) .WithMappings(TestHelper.GetAbsolutePath(@"mocks\greet")) //.WithWatchStaticMappings(true) //.WithBindMount(TestHelper.GetAbsolutePath(@"mocks\greet"), "/home/wiremock") .Build(); ``` i have the json files under the path and it is not working. it works with `.WithWatchStaticMappings(true)` with CopyAsync
adam added the bug label 2025-12-29 15:30:44 +01:00
adam closed this issue 2025-12-29 15:30:45 +01:00
Author
Owner

@GomesNayagam commented on GitHub (Apr 11, 2025):

will it also support mapping like testcontainer volume folder structure like. so that i can prepare all the payload into a directory like. I do the same with other testcontainer using .WithBindMount()

/payroll
/files
/output.json
/mapptings
/request.json

files => for response payload
mapptings => for request response details

@GomesNayagam commented on GitHub (Apr 11, 2025): will it also support mapping like testcontainer volume folder structure like. so that i can prepare all the payload into a directory like. I do the same with other testcontainer using .WithBindMount() /payroll /files /output.json /mapptings /request.json files => for response payload mapptings => for request response details
Author
Owner

@StefH commented on GitHub (Nov 30, 2025):

@GomesNayagam
This should be fixed preview 1.16.0-ci-110650 , can you check this?

@StefH commented on GitHub (Nov 30, 2025): @GomesNayagam This should be fixed preview 1.16.0-ci-110650 , can you check this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#679