Quarkus : Mock bean in dev mode #34269
antoinechamot
started this conversation in
Community
Replies: 1 comment
-
I think your best bet would be to have an custom extension that starts the mock server and configure it to run for dev and testing. This also make that reusable if you have more microservices depending on that rpc server |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my Quarkus application have a bean with a grpc client :
For test i managed to mock this bean with :
But in dev mode i want to do the same (i don't have and want to start a grpc server). How can i do ?
I am aware that i could annotate this bean with @IfBuildProfile("prod") and create another one mocked, but it would pollute my src/main/java and i don't want that. Is it possible to achieve this elegantly ?
Beta Was this translation helpful? Give feedback.
All reactions