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

Add option to read multiple desc files from multiple URLs #70

Open
gertz167 opened this issue May 6, 2024 · 1 comment
Open

Add option to read multiple desc files from multiple URLs #70

gertz167 opened this issue May 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@gertz167
Copy link

gertz167 commented May 6, 2024

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

@gertz167 gertz167 added the enhancement New feature or request label May 6, 2024
@gertz167
Copy link
Author

gertz167 commented May 6, 2024

I added the main change in PR #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant