|
|
|
|
@ -20,9 +20,7 @@ import java.util.Map;
@@ -20,9 +20,7 @@ import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
import org.junit.runner.RunWith; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
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.SpringApplicationConfiguration; |
|
|
|
|
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 |
|
|
|
|
public class SampleActuatorUiApplicationPortTests { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private SecurityProperties security; |
|
|
|
|
|
|
|
|
|
@Value("${local.server.port}") |
|
|
|
|
private int port = 9010; |
|
|
|
|
|
|
|
|
|
@ -75,8 +70,7 @@ public class SampleActuatorUiApplicationPortTests {
@@ -75,8 +70,7 @@ public class SampleActuatorUiApplicationPortTests {
|
|
|
|
|
ResponseEntity<String> entity = new TestRestTemplate().getForEntity( |
|
|
|
|
"http://localhost:" + this.managementPort + "/health", String.class); |
|
|
|
|
assertEquals(HttpStatus.OK, entity.getStatusCode()); |
|
|
|
|
assertEquals("{\"status\":\"UP\",\"application\":{\"status\":\"UP\"}}", |
|
|
|
|
entity.getBody()); |
|
|
|
|
assertEquals("{\"status\":\"UP\"}", entity.getBody()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|