Skip to content

Register discovered config sources in QuarkusComponentTestExtension#53118

Open
tiwari91 wants to merge 1 commit intoquarkusio:mainfrom
tiwari91:fix-53037-component-test-yaml
Open

Register discovered config sources in QuarkusComponentTestExtension#53118
tiwari91 wants to merge 1 commit intoquarkusio:mainfrom
tiwari91:fix-53037-component-test-yaml

Conversation

@tiwari91
Copy link
Contributor

Fixes: #53037

@QuarkusComponentTest respects application.properties but not application.yaml because QuarkusComponentTestExtension only called addPropertiesSources() on the SmallRyeConfigBuilder, which registers .properties files but not YAML.

Changes

  • Added .addDiscoveredSources() to the config builder in QuarkusComponentTestExtension.startContainer(). This discovers config source providers via Java ServiceLoader, which includes YamlConfigSourceLoader when smallrye-config-source-yaml (brought in by quarkus-config-yaml) is on the classpath.
  • Added smallrye-config-source-yaml as a test dependency to verify the fix.
  • Added ApplicationYamlConfigSourceTest with an application.yaml test resource to verify YAML configuration is read correctly.

All 91 existing tests continue to pass.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@QuarkusComponentTest does not respect YAML configuration

1 participant