Added additional scenario to reflect scenario mentioned in spring-feature-flags

(even though the article does not point to any module in the codebase)
This commit is contained in:
Gerardo Roza 2021-01-18 15:50:55 -03:00
parent 1b127b9b00
commit b33fd1ee9c
3 changed files with 11 additions and 0 deletions

View File

@ -11,6 +11,7 @@ app.name=MyApp
app.description=${app.name} is a Spring Boot application
logging.file.name=myapplication.log
bael.property=defaultValue
bael.otherProperty=defaultOtherValue
#---
spring.config.activate.on-profile=multidocument-dev
spring.datasource.password=password
@ -18,6 +19,9 @@ spring.datasource.url=jdbc:h2:dev
spring.datasource.username=SA
bael.property=devValue
#---
spring.config.activate.on-profile=multidocument-integration-extension
bael.otherProperty=integrationExtensionOtherValue
#---
spring.config.activate.on-profile=multidocument-prod
spring.datasource.password=password
spring.datasource.url=jdbc:h2:prod

View File

@ -2,6 +2,9 @@ bael:
root-level-property: defaultRootLevelValue
---
spring:
profiles:
group:
multidocument-integration: multidocument-integration-extension
config:
activate:
on-profile: multidocument-staging

View File

@ -17,12 +17,16 @@ public class IntegrationMultidocumentFilesIntegrationTest {
@Value("${bael.property}")
private String baelCustomProperty;
@Value("${bael.otherProperty}")
private String baelCustomOtherProperty;
@Value("${bael.root-level-property}")
private String baelRootProperty;
@Test
public void givenProductionProfileActive_whenApplicationStarts_thenDefaultPropertiesUser() {
assertThat(baelCustomProperty).isEqualTo("integrationValue");
assertThat(baelCustomOtherProperty).isEqualTo("integrationExtensionOtherValue");
assertThat(baelRootProperty).isEqualTo("defaultRootLevelValue");
}
}