Support for non-mock @ConfigMapping
in @QuarkusComponentTest
#36373
Labels
Milestone
@ConfigMapping
in @QuarkusComponentTest
#36373
Description
It would be nice if config mappings (
@ConfigMapping
-annotated interfaces) could be supported in@QuarkusComponentTest
, either by default or as an opt-in feature.Currently they seem to always be mocked, while I'd like them to be handled as they would in a normal application.
For example, if I have a component like this:
And a test like this:
... then the test won't pass because
FooConfig
is always injected as a mock, and as a resultconfig.bar()
returnsfalse
by default.Using
new QuarkusComponentTestExtension(Foo.FooConfig.class)
doesn't seem to help.Implementation ideas
Quote from @mkouba (taken out of context, as all good quotes are):
The text was updated successfully, but these errors were encountered: