From 68d492fdbafd71cb63f6e332664681c3e8056497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Tue, 11 Dec 2018 09:47:01 +0100 Subject: [PATCH 1/5] apply workaround for odo --- pom.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fefb677..874c935 100644 --- a/pom.xml +++ b/pom.xml @@ -166,9 +166,9 @@ org.springframework.boot spring-boot-maven-plugin ${spring-boot.version} - + @@ -177,6 +177,13 @@ + + org.apache.maven.plugins + maven-failsafe-plugin + + ${project.build.directory}/${project.build.finalName}.${project.packaging}.original + + From 759e47c893d11705952bc7295e990a399b72ae55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Tue, 11 Dec 2018 09:48:46 +0100 Subject: [PATCH 2/5] Revert "apply workaround for odo" This reverts commit 68d492fdbafd71cb63f6e332664681c3e8056497. --- pom.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 874c935..fefb677 100644 --- a/pom.xml +++ b/pom.xml @@ -166,9 +166,9 @@ org.springframework.boot spring-boot-maven-plugin ${spring-boot.version} - + @@ -177,13 +177,6 @@ - - org.apache.maven.plugins - maven-failsafe-plugin - - ${project.build.directory}/${project.build.finalName}.${project.packaging}.original - - From 9ea228915b0ca5e918db0d6d5523496bd4d56f03 Mon Sep 17 00:00:00 2001 From: Andrea Tarocchi Date: Tue, 11 Dec 2018 23:46:37 +0100 Subject: [PATCH 3/5] Fix broken itests. --- pom.xml | 6 ++++++ .../com/redhat/fuse/boosters/rest/http/HttpRequestKT.java | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index fefb677..9775cc8 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,7 @@ 1.17.1 1.4.0.Final + 4.0.7 @@ -137,6 +138,11 @@ ${arquillian.version} test + + io.fabric8 + openshift-client + ${openshift-client.version} + diff --git a/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java b/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java index 0bcf11c..d94d41b 100644 --- a/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java +++ b/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java @@ -16,8 +16,9 @@ package com.redhat.fuse.boosters.rest.http; -import io.fabric8.kubernetes.api.model.v4_0.HasMetadata; -import io.fabric8.openshift.clnt.v4_0.OpenShiftClient; + +import io.fabric8.kubernetes.api.model.HasMetadata; +import io.fabric8.openshift.client.OpenShiftClient; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.junit.Test; @@ -37,7 +38,7 @@ public class HttpRequestKT { OpenShiftClient client; @Test - public void templateTest() throws Exception { + public void templateTest() { File template = new File(".openshiftio/application.yaml"); assertTrue(template.exists()); HashMap templateParameters = new HashMap(){ From d8636086ac4c5ad73b0267693d25ecb15b70a78a Mon Sep 17 00:00:00 2001 From: Brian Fitzpatrick Date: Tue, 11 Dec 2018 12:21:33 -0700 Subject: [PATCH 4/5] issue #25 - adjusting pom to remove classifier -- adjusting to remove additional formatting changes -- removed openshift-it profile Signed-off-by: Brian Fitzpatrick --- .openshiftio/application.yaml | 2 +- pom.xml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.openshiftio/application.yaml b/.openshiftio/application.yaml index 817f325..69dd93d 100644 --- a/.openshiftio/application.yaml +++ b/.openshiftio/application.yaml @@ -23,7 +23,7 @@ parameters: - name: ARTIFACT_COPY_ARGS description: Syntax to be used to copy uberjar files to the target directory displayName: Copy Args - value: '*-exec.jar' + value: '*.jar' required: true - name: GITHUB_WEBHOOK_SECRET description: A secret string used to configure the GitHub webhook. diff --git a/pom.xml b/pom.xml index fefb677..95bcc44 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 @@ -166,9 +168,6 @@ org.springframework.boot spring-boot-maven-plugin ${spring-boot.version} - - exec - From 1fa8f86a890c7678779a4fbbc2279c83a1378df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Thu, 13 Dec 2018 12:44:09 +0100 Subject: [PATCH 5/5] Use Collections.singletonMap to simplify code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Pupier --- .../boosters/rest/http/HttpRequestKT.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java b/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java index d94d41b..fc1ab37 100644 --- a/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java +++ b/src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java @@ -17,19 +17,21 @@ package com.redhat.fuse.boosters.rest.http; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.openshift.client.OpenShiftClient; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.util.Collections; +import java.util.List; +import java.util.Map; + import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.junit.Test; import org.junit.runner.RunWith; -import java.io.File; -import java.util.HashMap; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import io.fabric8.kubernetes.api.model.HasMetadata; +import io.fabric8.openshift.client.OpenShiftClient; @RunWith(Arquillian.class) public class HttpRequestKT { @@ -41,9 +43,7 @@ public class HttpRequestKT { public void templateTest() { File template = new File(".openshiftio/application.yaml"); assertTrue(template.exists()); - HashMap templateParameters = new HashMap(){ - {put("SOURCE_REPOSITORY_URL","https://github.com/jboss-fuse/fuse-rest-http-booster");} - }; + Map templateParameters = Collections.singletonMap("SOURCE_REPOSITORY_URL","https://github.com/jboss-fuse/fuse-rest-http-booster"); List resources = client.templates().load(template).process(templateParameters).getItems(); for(HasMetadata res : resources){