Skip to content

Commit

Permalink
Various updates/cleanups from review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
klustria committed May 20, 2022
1 parent 2739062 commit a9236e3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,6 @@ void resetConfig() {
}
}

// @Test
void testMetaYaml() {
System.setProperty(MpMetaConfig.META_CONFIG_SYSTEM_PROPERTY, "custom-mp-meta-config.yaml");
config = ConfigProvider.getConfig();

// validate the config sources
Iterable<ConfigSource> configSources = config.getConfigSources();
List<String> sourceNames = new LinkedList<>();
configSources.forEach(it -> sourceNames.add(it.getName()));

assertThat(sourceNames, iterableWithSize(2));
assertThat(sourceNames.get(0), is("CLASSPATH"));
assertThat(config.getValue("value", String.class), is("classpath"));
}

@Test
void testMetaEnvironmentVariablesSystemProperties() {
System.setProperty("property1", "value1");
Expand Down
24 changes: 0 additions & 24 deletions config/config-mp/src/test/resources/custom-application.conf

This file was deleted.

10 changes: 0 additions & 10 deletions config/config-mp/src/test/resources/custom-application.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ void relativePath(Path relativePath) {
* @param what file name
* @return file name with extension
*/
public static String patchName(String what) {
java.util.Optional<String> base = java.util.Optional.of(what)
private static String patchName(String what) {
Optional<String> base = Optional.of(what)
.filter(f -> f.contains(File.separator))
.map(f -> f.substring(f.lastIndexOf(File.separator) + 1));
java.util.Optional<String> ext = Optional.of(base.orElse(what))
Optional<String> ext = Optional.of(base.orElse(what))
.filter(f -> f.contains("."))
.map(f -> f.substring(f.lastIndexOf(".") + 1));
return ext.isPresent() ? what : what + HOCON_EXTENSION;
Expand Down

0 comments on commit a9236e3

Please sign in to comment.