diff --git a/.openshiftio/application.yaml b/.openshiftio/application.yaml index 506a280..d2aa8e4 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 0bfd136..e687cce 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 @@ -18,6 +20,7 @@ 1.17.1 1.4.0.Final + 4.0.7 @@ -131,6 +134,11 @@ ${arquillian.version} test + + io.fabric8 + openshift-client + ${openshift-client.version} + @@ -160,9 +168,6 @@ org.jboss.redhat-fuse spring-boot-maven-plugin ${fuse.bom.version} - - exec - 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 ac5f2a6..8b264ea 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,19 +16,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 { @@ -37,15 +39,14 @@ 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(){ - {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){ + for (HasMetadata res : resources) { client.resource(res).createOrReplace(); }