From 3d944f7e6fa1b38e8a1e4b332d180c1b8796513a Mon Sep 17 00:00:00 2001 From: Sebastian Mancke Date: Sat, 26 Nov 2016 18:19:51 +0100 Subject: [PATCH 1/4] enhanced spring version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1ffcbb0..844d10a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.springframework.boot spring-boot-starter-parent - 1.2.2.RELEASE + 1.4.2.RELEASE @@ -61,4 +61,4 @@ - \ No newline at end of file + From fc0c4246767942942f5dd425ede0641c32fef383 Mon Sep 17 00:00:00 2001 From: Sebastian Mancke Date: Sat, 26 Nov 2016 18:39:59 +0100 Subject: [PATCH 2/4] fixed test --- src/test/java/com/gazgeek/helloworld/HealthTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/gazgeek/helloworld/HealthTest.java b/src/test/java/com/gazgeek/helloworld/HealthTest.java index 75f73b2..b58c2be 100644 --- a/src/test/java/com/gazgeek/helloworld/HealthTest.java +++ b/src/test/java/com/gazgeek/helloworld/HealthTest.java @@ -15,7 +15,9 @@ import java.net.URI; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.contains; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.springframework.http.HttpStatus.OK; @RunWith(SpringJUnit4ClassRunner.class) @@ -31,9 +33,9 @@ public class HealthTest { @Test public void checkHealth() { - getRequest("/health") - .assertStatusCode(OK) - .assertResponseBody("{\"status\":\"UP\"}"); + HealthResponse r = getRequest("/health"); + r.assertStatusCode(OK); + assertTrue(r.responseEntity.getBody().contains("\"status\":\"UP\"")); } From 21f9cf679122efbbe02364bba87b65cd43d882fe Mon Sep 17 00:00:00 2001 From: Sebastian Mancke Date: Sat, 26 Nov 2016 18:43:13 +0100 Subject: [PATCH 3/4] updated docker java dependency --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0e04922..599275a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM dockerfile/java:oracle-java8 +FROM openjdk:8-alpine ENV MAVEN_VERSION 3.2.5 From cce94a8e95f8184dfe2682b96a07200d284a6ef0 Mon Sep 17 00:00:00 2001 From: Sebastian Mancke Date: Sat, 26 Nov 2016 18:45:53 +0100 Subject: [PATCH 4/4] updated docker java dependency --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 599275a..7be4192 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM openjdk:8-alpine ENV MAVEN_VERSION 3.2.5 -RUN curl -sSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \ +RUN apk --update add curl \ + && curl -sSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \ && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \ && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn