Polish
This commit is contained in:
@@ -46,7 +46,7 @@ public class EndpointsPropertiesSampleActuatorApplicationTests {
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
public void testCustomErrorPath() throws Exception {
|
||||
public void testCustomErrorPath() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword()).getForEntity("/oops", Map.class);
|
||||
@@ -58,7 +58,7 @@ public class EndpointsPropertiesSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomContextPath() throws Exception {
|
||||
public void testCustomContextPath() {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/admin/health", String.class);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ManagementAddressActuatorApplicationTests {
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
public void testHome() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = new TestRestTemplate()
|
||||
.getForEntity("http://localhost:" + this.port, Map.class);
|
||||
@@ -58,7 +58,7 @@ public class ManagementAddressActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
public void testHealth() {
|
||||
ResponseEntity<String> entity = new TestRestTemplate()
|
||||
.withBasicAuth("user", getPassword()).getForEntity("http://localhost:"
|
||||
+ this.managementPort + "/admin/actuator/health", String.class);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ManagementPathSampleActuatorApplicationTests {
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
public void testHealth() {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/admin/health", String.class);
|
||||
@@ -54,7 +54,7 @@ public class ManagementPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHomeIsSecure() throws Exception {
|
||||
public void testHomeIsSecure() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
public void testHome() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = new TestRestTemplate("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.port, Map.class);
|
||||
@@ -69,7 +69,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
public void testHealth() {
|
||||
ResponseEntity<String> entity = new TestRestTemplate()
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.managementPort + "/admin/health",
|
||||
@@ -79,7 +79,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissing() throws Exception {
|
||||
public void testMissing() {
|
||||
ResponseEntity<String> entity = new TestRestTemplate("user", getPassword())
|
||||
.getForEntity(
|
||||
"http://localhost:" + this.managementPort + "/admin/missing",
|
||||
@@ -89,7 +89,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testErrorPage() throws Exception {
|
||||
public void testErrorPage() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = new TestRestTemplate("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.port + "/error", Map.class);
|
||||
@@ -100,7 +100,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testManagementErrorPage() throws Exception {
|
||||
public void testManagementErrorPage() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = new TestRestTemplate("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.managementPort + "/error",
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ManagementPortSampleActuatorApplicationTests {
|
||||
private int managementPort = 9011;
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
public void testHome() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = new TestRestTemplate("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.port, Map.class);
|
||||
@@ -70,7 +70,7 @@ public class ManagementPortSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
public void testHealth() {
|
||||
ResponseEntity<String> entity = new TestRestTemplate()
|
||||
.withBasicAuth("user", getPassword()).getForEntity(
|
||||
"http://localhost:" + this.managementPort + "/actuator/health",
|
||||
@@ -80,7 +80,7 @@ public class ManagementPortSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testErrorPage() throws Exception {
|
||||
public void testErrorPage() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = new TestRestTemplate("user", getPassword())
|
||||
.getForEntity("http://localhost:" + this.managementPort + "/error",
|
||||
|
||||
@@ -45,7 +45,7 @@ public class NoManagementSampleActuatorApplicationTests {
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
public void testHome() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword()).getForEntity("/", Map.class);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class SampleActuatorApplicationTests {
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
public void testHomeIsSecure() throws Exception {
|
||||
public void testHomeIsSecure() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
@@ -63,7 +63,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMetricsIsSecure() throws Exception {
|
||||
public void testMetricsIsSecure() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/metrics",
|
||||
Map.class);
|
||||
@@ -77,7 +77,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
public void testHome() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword()).getForEntity("/", Map.class);
|
||||
@@ -103,7 +103,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEnv() throws Exception {
|
||||
public void testEnv() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
@@ -115,7 +115,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
public void testHealth() {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/actuator/health", String.class);
|
||||
@@ -125,7 +125,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInfo() throws Exception {
|
||||
public void testInfo() {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/actuator/info", String.class);
|
||||
@@ -140,7 +140,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testErrorPage() throws Exception {
|
||||
public void testErrorPage() {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword()).getForEntity("/foo", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
@@ -149,7 +149,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHtmlErrorPage() throws Exception {
|
||||
public void testHtmlErrorPage() {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
|
||||
HttpEntity<?> request = new HttpEntity<Void>(headers);
|
||||
@@ -164,7 +164,7 @@ public class SampleActuatorApplicationTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testTrace() throws Exception {
|
||||
public void testTrace() {
|
||||
this.restTemplate.getForEntity("/health", String.class);
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
@@ -181,7 +181,7 @@ public class SampleActuatorApplicationTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void traceWithParameterMap() throws Exception {
|
||||
public void traceWithParameterMap() {
|
||||
this.restTemplate.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/actuator/health?param1=value1", String.class);
|
||||
@SuppressWarnings("rawtypes")
|
||||
@@ -198,7 +198,7 @@ public class SampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testErrorPageDirectAccess() throws Exception {
|
||||
public void testErrorPageDirectAccess() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword()).getForEntity("/error", Map.class);
|
||||
@@ -211,7 +211,7 @@ public class SampleActuatorApplicationTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testBeans() throws Exception {
|
||||
public void testBeans() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
@@ -224,7 +224,7 @@ public class SampleActuatorApplicationTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void testConfigProps() throws Exception {
|
||||
public void testConfigProps() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ServletPathSampleActuatorApplicationTests {
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
public void testErrorPath() throws Exception {
|
||||
public void testErrorPath() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
@@ -58,7 +58,7 @@ public class ServletPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHealth() throws Exception {
|
||||
public void testHealth() {
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
.getForEntity("/spring/actuator/health", String.class);
|
||||
@@ -67,7 +67,7 @@ public class ServletPathSampleActuatorApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHomeIsSecure() throws Exception {
|
||||
public void testHomeIsSecure() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/spring/",
|
||||
Map.class);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ShutdownSampleActuatorApplicationTests {
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
public void testHome() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword()).getForEntity("/", Map.class);
|
||||
@@ -57,7 +57,7 @@ public class ShutdownSampleActuatorApplicationTests {
|
||||
|
||||
@Test
|
||||
@DirtiesContext
|
||||
public void testShutdown() throws Exception {
|
||||
public void testShutdown() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate
|
||||
.withBasicAuth("user", getPassword())
|
||||
|
||||
Reference in New Issue
Block a user