Polish
This commit is contained in:
@@ -62,8 +62,8 @@ public class ManagementAddressActuatorApplicationTests {
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
ResponseEntity<String> entity = new TestRestTemplate()
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.managementPort + "/admin/application/health",
|
||||
.withBasicAuth("user", getPassword()).getForEntity("http://localhost:"
|
||||
+ this.managementPort + "/admin/application/health",
|
||||
String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
assertThat(entity.getBody()).contains("\"status\":\"UP\"");
|
||||
|
||||
@@ -49,9 +49,9 @@ public class ServletPathSampleActuatorApplicationTests {
|
||||
@Test
|
||||
public void testErrorPath() throws Exception {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/spring/error",
|
||||
Map.class);
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/spring/error", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> body = entity.getBody();
|
||||
|
||||
Reference in New Issue
Block a user