-
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 #10196
Conversation
@kenfinnigan @asoldano what do you think about this? It obviously depends heavily on RESTEasy internals, but given how closely we collaborate, I don't think it will be a problem to have this as a first iteration - then if you agree we can look into providing proper hooks in the the RESTEasy codebase if you think we should. |
@knutwannheden this solves #10126 that we talked about |
PR is in draft and need a lot more testing |
Is it not possible for test profile in |
Sure, but this for changing the URL per test, without having to restart or rebuild anything. Same idea as we have with |
Why does the URL need to change per test? Wouldn't it be the same for all tests? |
Because that limits you to only what the mock server can return, which I realize that in most cases would suffice, but limits some testing scenarios. |
I haven't tested it yet, but AFAICT #9933 would also be sufficient for my purposes. |
Yeah, the test profiles are an excellent way to change properties. |
Lots of conflicts and didn't get any attention for a while. I will close it. We can still reopen it if we want to revisit. |
Fixes: #10126
This PR provides the basic low level building blocks that are needed in order to support changing the baseURL in tests (just take a look at the changed test to see how it's meant to be used).
It can certainly be used by end users , but ideally it would also be used under the hood by higher level abstractions in the same way that
QuarkusMock
andInjectMock
complement each other.