Skip to content

Commit

Permalink
Clear VCAP_APPLICATION after tests
Browse files Browse the repository at this point in the history
So that other CF tests do not fail.
  • Loading branch information
dsyer committed Dec 12, 2016
1 parent 95ee145 commit cc8ecb6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.Collections;
import java.util.Map;

import org.junit.After;
import org.junit.Test;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
Expand All @@ -45,6 +46,12 @@ public EnvironmentEndpointTests() {
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();
Expand Down

0 comments on commit cc8ecb6

Please sign in to comment.