wiremock-grpc-extension
wiremock-grpc-extension copied to clipboard
Add option to read multiple desc files from multiple URLs
Proposal
Currently there must be defined an additional sub directory named "grpc" in wiremock directory.
In our case the grpc desc files are part of a maven-third-party lib. That means we can not easily copy the desc files from a maven library to a subdirecty wiremock/grpc.
It would be great that the class GrpcExtensionFactory/GrpcHttpServerFactory supports URLs. That would allow us to read the grpc desc files directly from the third-party-lib.
Here is an example how it would look like:
@Test
void testExecuteWiremockTest() {
// read myexample.com from third-party-maven-lib
URL resource = this.getClass().getClassLoader().getResource("myexample.desc");
System.out.println(resource.getFile());
WireMockConfiguration options = WireMockConfiguration.options();
options
.dynamicPort()
.extensions(new GrpcExtensionFactory(Collections.singletonList(resource)));
wireMockServer = new com.github.tomakehurst.wiremock.WireMockServer(options);
wireMockServer.start();
}
References
No response