|
|
|
|
@ -4,7 +4,7 @@ import org.junit.Assert;
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
import org.junit.runner.RunWith; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.boot.context.embedded.LocalServerPort; |
|
|
|
|
import org.springframework.boot.web.server.LocalServerPort; |
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest; |
|
|
|
|
import org.springframework.boot.test.web.client.TestRestTemplate; |
|
|
|
|
import org.springframework.test.context.junit4.SpringRunner; |
|
|
|
|
@ -26,6 +26,6 @@ public class HttpRequestTest {
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void healthShouldReturnOkMessage() throws Exception { |
|
|
|
|
Assert.assertEquals( "{\"status\":\"UP\"}", this.restTemplate.getForObject("http://localhost:" + port + "/health", String.class)); |
|
|
|
|
Assert.assertEquals( "{\"status\":\"UP\"}", this.restTemplate.getForObject("http://localhost:" + port + "/actuator/health", String.class)); |
|
|
|
|
} |
|
|
|
|
} |