-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow QuarkusTest to override base URL of REST client #10126
Comments
I have a technical way to do this (using a lot of reflection), but the best way for a user to use this isn't clear to me. Would you like to open start a quarkus-dev mailing thread discussion where you will present this use case to folks and ask what they think the best API is? Thanks |
The simplest thing I can think of is to expose a class like WDYT? |
Yes, something like that sounds good to me. I can't really say if it should be |
Yeah, makes sense |
I'll go ahead and close this as #9933 has been merged and is part of 1.6 |
@knutwannheden How did you ultimately solve this problem? The TestProfiles need the config properties at build time, right? But the Pact mockserver url is only available at runtime. Thats why I would love to see the |
As discussed on Zulip it could be useful if a test could override the base URL of a given REST client.
One use case (as discussed on Zulip) would be for a PACT consumer test, where the test invokes some method on a REST client (directly or indirectly through some service in the application under test), which in turn should direct its request to some PACT mock server, which records the request and returns a canned response.
As a workaround the test currently has to create a REST client manually using
RestClientBuilder
.The text was updated successfully, but these errors were encountered: