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:
Phillip Webb 2022-05-17 22:16:24 -07:00
parent 44c979beb0
commit 7da42d7139

View File

@ -254,6 +254,7 @@ class ConfigurationPropertiesTests {
@Test
void loadWhenBindingWithDefaultsInXmlShouldBind() {
removeSystemProperties();
load(new Class<?>[] { BasicConfiguration.class, DefaultsInXmlConfiguration.class });
BasicProperties bean = this.context.getBean(BasicProperties.class);
assertThat(bean.name).isEqualTo("bar");