[bs-107] Finish off varz->metrics

[Fixes #49496887] [bs-107] Remove trailing "z" from management endpoint URLs
This commit is contained in:
Dave Syer
2013-05-23 19:26:25 +01:00
parent b7c0e3279e
commit e649ef44cc
11 changed files with 65 additions and 28 deletions

View File

@@ -77,11 +77,11 @@ public class ManagementAddressServiceBootstrapApplicationTests {
}
@Test
public void testVarz() throws Exception {
public void testMetrics() throws Exception {
testHome(); // makes sure some requests have been made
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = getRestTemplate().getForEntity(
"http://localhost:" + managementPort + "/varz", Map.class);
"http://localhost:" + managementPort + "/metrics", Map.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
@SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody();
@@ -89,9 +89,9 @@ public class ManagementAddressServiceBootstrapApplicationTests {
}
@Test
public void testHealthz() throws Exception {
public void testHealth() throws Exception {
ResponseEntity<String> entity = getRestTemplate().getForEntity(
"http://localhost:" + managementPort + "/healthz", String.class);
"http://localhost:" + managementPort + "/health", String.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
assertEquals("ok", entity.getBody());
}

View File

@@ -65,9 +65,9 @@ public class ManagementServiceBootstrapApplicationTests {
}
@Test
public void testHealthz() throws Exception {
public void testHealth() throws Exception {
ResponseEntity<String> entity = getRestTemplate().getForEntity(
"http://localhost:" + managementPort + "/healthz", String.class);
"http://localhost:" + managementPort + "/health", String.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
assertEquals("ok", entity.getBody());
}

View File

@@ -75,11 +75,11 @@ public class NoManagementServiceBootstrapApplicationTests {
}
@Test(expected = ResourceAccessException.class)
public void testVarzNotAvailable() throws Exception {
public void testMetricsNotAvailable() throws Exception {
testHome(); // makes sure some requests have been made
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = getRestTemplate("user", "password").getForEntity(
"http://localhost:" + managementPort + "/varz", Map.class);
"http://localhost:" + managementPort + "/metrics", Map.class);
assertEquals(HttpStatus.NOT_FOUND, entity.getStatusCode());
}

View File

@@ -84,11 +84,11 @@ public class ServiceBootstrapApplicationTests {
}
@Test
public void testVarz() throws Exception {
public void testMetrics() throws Exception {
testHome(); // makes sure some requests have been made
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = getRestTemplate("user", "password").getForEntity(
"http://localhost:8080/varz", Map.class);
"http://localhost:8080/metrics", Map.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
@SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody();
@@ -96,9 +96,9 @@ public class ServiceBootstrapApplicationTests {
}
@Test
public void testHealthz() throws Exception {
public void testHealth() throws Exception {
ResponseEntity<String> entity = getRestTemplate().getForEntity(
"http://localhost:8080/healthz", String.class);
"http://localhost:8080/health", String.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
assertEquals("ok", entity.getBody());
}