From a1d2a8df6b13297e7074f59f4577076fab557db4 Mon Sep 17 00:00:00 2001 From: Andrea Tarocchi Date: Tue, 5 Nov 2019 17:10:51 +0100 Subject: [PATCH] ENTESB-11864 was affecting sb2 boosters as well: fixed. --- .openshiftio/application.yaml | 4 ++-- README.adoc | 4 ++-- src/main/resources/application.properties | 1 + .../com/redhat/fuse/boosters/rest/http/HttpRequestTest.java | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.openshiftio/application.yaml b/.openshiftio/application.yaml index ff7683d..d2aa8e4 100644 --- a/.openshiftio/application.yaml +++ b/.openshiftio/application.yaml @@ -169,7 +169,7 @@ objects: imagePullPolicy: IfNotPresent livenessProbe: httpGet: - path: /actuator/health + path: /health port: 8080 scheme: HTTP initialDelaySeconds: 180 @@ -186,7 +186,7 @@ objects: protocol: TCP readinessProbe: httpGet: - path: /actuator/health + path: /health port: 8080 scheme: HTTP initialDelaySeconds: 10 diff --git a/README.adoc b/README.adoc index 0d6ded6..435108e 100644 --- a/README.adoc +++ b/README.adoc @@ -100,14 +100,14 @@ $ oc new-project MY_PROJECT_NAME + [source,bash,options="nowrap",subs="attributes+"] ---- -$ oc import-image fis-java-openshift:2.0 --from={image} --confirm +$ oc import-image fuse-java-openshift:2.0 --from={image} --confirm ---- . Build and deploy the project to the OpenShift cluster: + [source,bash,options="nowrap",subs="attributes+"] ---- -$ mvn clean -DskipTests fabric8:deploy -Popenshift -Dfabric8.generator.fromMode=istag -Dfabric8.generator.from=MY_PROJECT_NAME/fis-java-openshift:2.0 +$ mvn clean -DskipTests fabric8:deploy -Popenshift -Dfabric8.generator.fromMode=istag -Dfabric8.generator.from=MY_PROJECT_NAME/fuse-java-openshift:2.0 ---- . In your browser, navigate to the `MY_PROJECT_NAME` project in the OpenShift console. diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 57ab22d..5b388dc 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,5 @@ server.port=8080 +management.endpoints.web.base-path=/ # disable all management enpoints except health endpoints.enabled = false diff --git a/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestTest.java b/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestTest.java index f7f5256..be6a627 100644 --- a/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestTest.java +++ b/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestTest.java @@ -26,6 +26,6 @@ public class HttpRequestTest { @Test public void healthShouldReturnOkMessage() throws Exception { - Assert.assertEquals( "{\"status\":\"UP\"}", this.restTemplate.getForObject("http://localhost:" + port + "/actuator/health", String.class)); + Assert.assertEquals( "{\"status\":\"UP\"}", this.restTemplate.getForObject("http://localhost:" + port + "/health", String.class)); } }