Clear VCAP_APPLICATION after tests

So that other CF tests do not fail.
This commit is contained in:
Dave Syer 2016-12-12 15:05:07 +00:00
parent 95ee145281
commit cc8ecb6ff5

View File

@ -19,6 +19,7 @@ package org.springframework.boot.actuate.endpoint;
import java.util.Collections;
import java.util.Map;
import org.junit.After;
import org.junit.Test;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@ -45,6 +46,12 @@ public class EnvironmentEndpointTests extends AbstractEndpointTests<EnvironmentE
super(Config.class, EnvironmentEndpoint.class, "env", true, "endpoints.env");
}
@Override
@After
public void close() {
System.clearProperty("VCAP_SERVICES");
}
@Test
public void invoke() throws Exception {
assertThat(getEndpointBean().invoke()).isNotEmpty();