Skip to content

Commit 89fe616

Browse files
author
Rishabh
authored
Search for integ test config in configs/common also (#26)
1 parent 65be90c commit 89fe616

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

integrationtest-service-framework/src/main/java/org/hypertrace/core/serviceframework/config/IntegrationTestConfigClient.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
*/
1010
public class IntegrationTestConfigClient implements ConfigClient {
1111
private static final String APPLICATION_CONFIG_FILE = "application.conf";
12+
private static final String INTEGRATION_TEST_COMMON_PREFIX = "configs/common";
1213
private static final String INTEGRATION_TEST_ENV = "local";
1314

15+
1416
private final String resourcePrefix;
1517

1618
public IntegrationTestConfigClient(String resourcePrefix) {
@@ -20,9 +22,11 @@ public IntegrationTestConfigClient(String resourcePrefix) {
2022
@Override
2123
public Config getConfig() {
2224
Config config = ConfigFactory.parseResources(resourcePrefix + "/" + APPLICATION_CONFIG_FILE);
25+
Config commonConfig = ConfigFactory.parseResources(
26+
String.format("%s/%s", INTEGRATION_TEST_COMMON_PREFIX, APPLICATION_CONFIG_FILE));
2327
Config localConfig = ConfigFactory.parseResources(resourcePrefix + "/" + INTEGRATION_TEST_ENV
2428
+ "/" + APPLICATION_CONFIG_FILE);
25-
return localConfig.withFallback(config).resolve();
29+
return localConfig.withFallback(config).withFallback(commonConfig).resolve();
2630
}
2731

2832
@Override

0 commit comments

Comments
 (0)