use of org.springframework.cloud.config.environment.Environment in project spring-cloud-config by spring-cloud.
the class MultipleJGitEnvironmentProfilePlaceholderRepositoryTests method mappingRepo.
@Test
public void mappingRepo() {
Environment environment = this.repository.findOne("application", "test1-config-repo", "master");
assertEquals(1, environment.getPropertySources().size());
String uri = getUri("*").replace("{profile}", "test1-config-repo");
assertEquals(uri + "/application.yml", environment.getPropertySources().get(0).getName());
assertVersion(environment);
assertThat(StringUtils.cleanPath(getRepository(uri).getBasedir().toString()), containsString("target/repos"));
}
use of org.springframework.cloud.config.environment.Environment in project spring-cloud-config by spring-cloud.
the class MultipleJGitEnvironmentProfilePlaceholderRepositoryTests method defaultRepo.
@Test
public void defaultRepo() {
Environment environment = this.repository.findOne("bar", "staging", "master");
assertEquals(2, environment.getPropertySources().size());
assertEquals(this.repository.getUri() + "/bar.properties", environment.getPropertySources().get(0).getName());
assertVersion(environment);
}
use of org.springframework.cloud.config.environment.Environment in project spring-cloud-config by spring-cloud.
the class MultipleJGitEnvironmentRepositoryTests method mappingRepo.
@Test
public void mappingRepo() {
Environment environment = this.repository.findOne("test1-svc", "staging", "master");
assertEquals(2, environment.getPropertySources().size());
assertEquals(getUri("*test1*") + "/test1-svc.properties", environment.getPropertySources().get(0).getName());
assertVersion(environment);
}
use of org.springframework.cloud.config.environment.Environment in project spring-cloud-config by spring-cloud.
the class MultipleJGitEnvironmentRepositoryTests method defaultRepo.
@Test
public void defaultRepo() {
Environment environment = this.repository.findOne("bar", "staging", "master");
assertEquals(2, environment.getPropertySources().size());
assertEquals(this.repository.getUri() + "/bar.properties", environment.getPropertySources().get(0).getName());
assertVersion(environment);
}
use of org.springframework.cloud.config.environment.Environment in project spring-cloud-config by spring-cloud.
the class MultipleJGitEnvironmentRepositoryTests method defaultRepoBranch.
@Test
public void defaultRepoBranch() {
Environment environment = this.repository.findOne("bar", "staging", "raw");
assertEquals(2, environment.getPropertySources().size());
assertEquals(this.repository.getUri() + "/bar.properties", environment.getPropertySources().get(0).getName());
assertVersion(environment);
}
Aggregations