Skip to content

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

Open
@gertz167

Description

@gertz167

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions