Commit ba40f133 authored by Andy Wilkinson's avatar Andy Wilkinson

Update expectation to match response from anonymous access to /health

parent 1c4650f3
...@@ -20,9 +20,7 @@ import java.util.Map; ...@@ -20,9 +20,7 @@ import java.util.Map;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.test.IntegrationTest; import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.TestRestTemplate; import org.springframework.boot.test.TestRestTemplate;
...@@ -46,9 +44,6 @@ import static org.junit.Assert.assertEquals; ...@@ -46,9 +44,6 @@ import static org.junit.Assert.assertEquals;
@DirtiesContext @DirtiesContext
public class SampleActuatorUiApplicationPortTests { public class SampleActuatorUiApplicationPortTests {
@Autowired
private SecurityProperties security;
@Value("${local.server.port}") @Value("${local.server.port}")
private int port = 9010; private int port = 9010;
...@@ -75,8 +70,7 @@ public class SampleActuatorUiApplicationPortTests { ...@@ -75,8 +70,7 @@ public class SampleActuatorUiApplicationPortTests {
ResponseEntity<String> entity = new TestRestTemplate().getForEntity( ResponseEntity<String> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + this.managementPort + "/health", String.class); "http://localhost:" + this.managementPort + "/health", String.class);
assertEquals(HttpStatus.OK, entity.getStatusCode()); assertEquals(HttpStatus.OK, entity.getStatusCode());
assertEquals("{\"status\":\"UP\",\"application\":{\"status\":\"UP\"}}", assertEquals("{\"status\":\"UP\"}", entity.getBody());
entity.getBody());
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment