Test spring.profiles.include in profile file
Add a test to ensure that `spring.profiles.include` is not silently ignored when used in a profile-specific file. See gh-24733
This commit is contained in:
parent
26a68ca2cf
commit
039df1d96d
|
@ -630,8 +630,14 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
|
|||
|
||||
@Test
|
||||
void runWhenHasIncludedProfilesWithProfileSpecificDocumentThrowsException() {
|
||||
assertThatExceptionOfType(InactiveConfigDataAccessException.class).isThrownBy(() -> this.application.run(
|
||||
"--spring.config.location=classpath:application-include-profiles-in-profile-specific-document.properties"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void runWhenHasIncludedProfilesWithProfileSpecificFileThrowsException() {
|
||||
assertThatExceptionOfType(InactiveConfigDataAccessException.class).isThrownBy(() -> this.application
|
||||
.run("--spring.config.location=classpath:application-include-profiles-in-profile-specific.properties"));
|
||||
.run("--spring.config.name=application-include-profiles-in-profile-specific-document"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
spring.profiles.include=p2
|
|
@ -0,0 +1 @@
|
|||
spring.profiles.active=test
|
Loading…
Reference in New Issue