This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 6c5e01294ccdd2815240953f86f16818f4f02f69
Author: Jonathan Gallimore <j...@jrg.me.uk>
AuthorDate: Mon Dec 2 20:09:25 2019 +0000

    Fix up failing REST client TCK tests
---
 .../MicroProfileRestClientTCKArchiveProcessor.java | 45 ++++++++++++++++++++++
 .../MicroProfileRestClientTCKExtension.java        | 29 ++++++++++++++
 ...org.jboss.arquillian.core.spi.LoadableExtension |  1 +
 .../rest-client/src/test/resources/arquillian.xml  |  3 ++
 4 files changed, 78 insertions(+)

diff --git 
a/tck/microprofile-tck/rest-client/src/test/java/org/apache/tomee/microprofile/tck/restclient/MicroProfileRestClientTCKArchiveProcessor.java
 
b/tck/microprofile-tck/rest-client/src/test/java/org/apache/tomee/microprofile/tck/restclient/MicroProfileRestClientTCKArchiveProcessor.java
new file mode 100644
index 0000000..049bcb9
--- /dev/null
+++ 
b/tck/microprofile-tck/rest-client/src/test/java/org/apache/tomee/microprofile/tck/restclient/MicroProfileRestClientTCKArchiveProcessor.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.tomee.microprofile.tck.restclient;
+
+import 
org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
+import org.jboss.arquillian.test.spi.TestClass;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ArchivePath;
+import org.jboss.shrinkwrap.api.Node;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.impl.base.path.BasicPath;
+
+import java.util.Map;
+
+public class MicroProfileRestClientTCKArchiveProcessor implements 
ApplicationArchiveProcessor {
+    @Override
+    public void process(final Archive<?> archive, final TestClass testClass) {
+        if (archive instanceof WebArchive) {
+
+            WebArchive webArchive = (WebArchive) archive;
+            final Map<ArchivePath, Node> content = webArchive.getContent();
+
+            final Node node = content.get(new 
BasicPath("META-INF/certificates-dir.txt"));
+            if (node != null) {
+                webArchive.addAsResource(node.getAsset(), 
"META-INF/certificates-dir.txt");
+            }
+        }
+    }
+}
diff --git 
a/tck/microprofile-tck/rest-client/src/test/java/org/apache/tomee/microprofile/tck/restclient/MicroProfileRestClientTCKExtension.java
 
b/tck/microprofile-tck/rest-client/src/test/java/org/apache/tomee/microprofile/tck/restclient/MicroProfileRestClientTCKExtension.java
new file mode 100644
index 0000000..8aedfc6
--- /dev/null
+++ 
b/tck/microprofile-tck/rest-client/src/test/java/org/apache/tomee/microprofile/tck/restclient/MicroProfileRestClientTCKExtension.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.tomee.microprofile.tck.restclient;
+
+import 
org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
+import org.jboss.arquillian.core.spi.LoadableExtension;
+
+public class MicroProfileRestClientTCKExtension implements LoadableExtension {
+    @Override
+    public void register(final ExtensionBuilder extensionBuilder) {
+        extensionBuilder.service(ApplicationArchiveProcessor.class, 
MicroProfileRestClientTCKArchiveProcessor.class);
+    }
+}
diff --git 
a/tck/microprofile-tck/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
 
b/tck/microprofile-tck/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
new file mode 100644
index 0000000..4ed3ae8
--- /dev/null
+++ 
b/tck/microprofile-tck/rest-client/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
@@ -0,0 +1 @@
+org.apache.tomee.microprofile.tck.restclient.MicroProfileRestClientTCKExtension
\ No newline at end of file
diff --git a/tck/microprofile-tck/rest-client/src/test/resources/arquillian.xml 
b/tck/microprofile-tck/rest-client/src/test/resources/arquillian.xml
index efbd165..7a0077f 100644
--- a/tck/microprofile-tck/rest-client/src/test/resources/arquillian.xml
+++ b/tck/microprofile-tck/rest-client/src/test/resources/arquillian.xml
@@ -34,6 +34,7 @@
       <property name="additionalLibs">
         mvn:com.github.tomakehurst:wiremock-standalone:2.10.1
         mvn:org.apache.httpcomponents:httpcore:4.4.6
+        mvn:junit:junit:4.12
       </property>
     </configuration>
   </container>
@@ -50,6 +51,7 @@
       <property name="additionalLibs">
         mvn:com.github.tomakehurst:wiremock-standalone:2.10.1
         mvn:org.apache.httpcomponents:httpcore:4.4.6
+        mvn:junit:junit:4.12
       </property>
       <property name="properties">
         tomee.mp.scan = all
@@ -69,6 +71,7 @@
       <property name="additionalLibs">
         mvn:com.github.tomakehurst:wiremock-standalone:2.10.1
         mvn:org.apache.httpcomponents:httpcore:4.4.6
+        mvn:junit:junit:4.12
       </property>
       <property name="properties">
         tomee.mp.scan = all

Reply via email to