|
|
|
@ -81,8 +81,10 @@ public class PolarisConfigFileLocatorTest {
|
|
|
|
|
Map<String, Object> emptyMap = new HashMap<>();
|
|
|
|
|
ConfigKVFile emptyConfigFile = new MockedConfigKVFile(emptyMap);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "bootstrap.properties")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
|
|
|
|
|
when(polarisConfigProperties.getGroups()).thenReturn(null);
|
|
|
|
|
when(environment.getActiveProfiles()).thenReturn(new String[] {});
|
|
|
|
@ -121,11 +123,15 @@ public class PolarisConfigFileLocatorTest {
|
|
|
|
|
Map<String, Object> emptyMap = new HashMap<>();
|
|
|
|
|
ConfigKVFile emptyConfigFile = new MockedConfigKVFile(emptyMap);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application-dev.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application-dev.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "bootstrap.properties")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "bootstrap-dev.properties")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap-dev.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap-dev.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
|
|
|
|
|
when(polarisConfigProperties.getGroups()).thenReturn(null);
|
|
|
|
|
when(environment.getActiveProfiles()).thenReturn(new String[] {"dev"});
|
|
|
|
@ -150,8 +156,10 @@ public class PolarisConfigFileLocatorTest {
|
|
|
|
|
|
|
|
|
|
when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "application.properties")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "bootstrap.properties")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yml")).thenReturn(emptyConfigFile);
|
|
|
|
|
when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yaml")).thenReturn(emptyConfigFile);
|
|
|
|
|
|
|
|
|
|
List<ConfigFileGroup> customFiles = new LinkedList<>();
|
|
|
|
|
ConfigFileGroup configFileGroup = new ConfigFileGroup();
|
|
|
|
|