mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-08 02:09:06 +00:00
Allow tests to pass when a NAME environment variable exists
Update `ConfigurationPropertiesTests` so that it will pass even if a local `NAME` environment variable is declared. Closes gh-31076
This commit is contained in:
+1
@@ -254,6 +254,7 @@ class ConfigurationPropertiesTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void loadWhenBindingWithDefaultsInXmlShouldBind() {
|
void loadWhenBindingWithDefaultsInXmlShouldBind() {
|
||||||
|
removeSystemProperties();
|
||||||
load(new Class<?>[] { BasicConfiguration.class, DefaultsInXmlConfiguration.class });
|
load(new Class<?>[] { BasicConfiguration.class, DefaultsInXmlConfiguration.class });
|
||||||
BasicProperties bean = this.context.getBean(BasicProperties.class);
|
BasicProperties bean = this.context.getBean(BasicProperties.class);
|
||||||
assertThat(bean.name).isEqualTo("bar");
|
assertThat(bean.name).isEqualTo("bar");
|
||||||
|
|||||||
Reference in New Issue
Block a user