Skip to content

Commit

Permalink
#486 added classpath configs and configuration profiles to AbstractPl…
Browse files Browse the repository at this point in the history
…uginIT config (#487)
  • Loading branch information
DirkMahler authored Jul 19, 2024
1 parent eea38b2 commit 6071c9b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public void beforeEach(TestInfo testInfo) throws IOException, RuleException {
protected void configure(ConfigurationBuilder configurationBuilder) {
}

protected List<String> getConfigurationProfiles() {
return emptyList();
}

private ConfigurationBuilder createConfigurationBuilder() {
ConfigurationBuilder configurationBuilder = new ConfigurationBuilder("ITConfigSource", 110);
TestStore.Type type = testStore != null ? testStore.type() : TestStore.Type.MEMORY;
Expand Down Expand Up @@ -174,6 +178,8 @@ public void stopStore() {
*/
private Configuration createConfiguration(ConfigurationBuilder configurationBuilder) {
return ConfigurationMappingLoader.builder(Configuration.class)
.withClasspath()
.withProfiles(getConfigurationProfiles())
.load(configurationBuilder.build(), new EnvConfigSource() {
}, new SysPropConfigSource());
}
Expand Down

0 comments on commit 6071c9b

Please sign in to comment.