Commit df0d44d1 by Dave Syer

Update docs and tests for /eureka path

parent 5055b46e
......@@ -41,7 +41,7 @@ public class Application {
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8080/v2/
defaultZone: http://localhost:8761/eureka/api/
```
The default application name, virtual host and non-secure port are taken from the `Environment` is
......@@ -89,7 +89,7 @@ public class Application {
```
The server has a home page with a UI, and HTTP API endpoints per the
normal Eureka functionality under `/v2/*`.
normal Eureka functionality under `/eureka/api/*`.
Eureka background reading: see https://github.com/cfregly/fluxcapacitor/wiki/NetflixOSS-FAQ#eureka-service-discovery-load-balancer[flux capacitor] and https://groups.google.com/forum/?fromgroups#!topic/eureka_netflix/g3p2r7gHnN0[google group discussion].
......
......@@ -27,14 +27,14 @@ public class ApplicationTests {
@Test
public void catalogLoads() {
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity("http://localhost:" + port + "/v2/apps", Map.class);
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity("http://localhost:" + port + "/eureka/api/apps", Map.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
}
@Test
public void adminLoads() {
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity("http://localhost:" + port + "/admin/env", Map.class);
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity("http://localhost:" + port + "/env", Map.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
}
......
......@@ -22,7 +22,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@WebAppConfiguration
@IntegrationTest({ "server.port=0", "spring.application.name=eureka", "management.contextPath=/admin", "spring.jmx.enabled=true" })
@IntegrationTest({ "server.port=0", "spring.application.name=eureka", "spring.jmx.enabled=true" })
public class ApplicationTests {
@Value("${local.server.port}")
......@@ -43,7 +43,7 @@ public class ApplicationTests {
public void catalogLoads() {
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + port + "/v2/apps", Map.class);
"http://localhost:" + port + "/eureka/api/apps", Map.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
}
......@@ -51,7 +51,7 @@ public class ApplicationTests {
public void adminLoads() {
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + port + "/admin/env", Map.class);
"http://localhost:" + port + "/env", Map.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
}
......
......@@ -40,8 +40,8 @@ eureka:
availabilityZones: default
#serviceUrl:
#default: http://localhost:8080/eureka/v2/
#defaultZone: http://localhost:8080/eureka/v2/
#default: http://localhost:8761/eureka/api/
#defaultZone: http://localhost:8761/eureka/api/
instance:
#Virtual host name by which the clients identifies this service
......
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