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

gnodet pushed a commit to branch KARAF-5447
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/KARAF-5447 by this push:
     new 68520e3  [KARAF-5447] Fix integration tests
68520e3 is described below

commit 68520e3ac7b90cd787617ff4cc8a576bb23f7c38
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Dec 5 09:10:58 2017 +0100

    [KARAF-5447] Fix integration tests
---
 .../itests/features/Spring43FeaturesTest.java      | 24 ++++++++++++++-
 ...FeaturesTest.java => Spring50FeaturesTest.java} | 36 +++++++++++++---------
 2 files changed, 45 insertions(+), 15 deletions(-)

diff --git 
a/itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
 
b/itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
index 5d5f7a5..d5d4339 100644
--- 
a/itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
+++ 
b/itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
@@ -16,14 +16,36 @@ package org.apache.karaf.itests.features;
 import org.apache.karaf.itests.KarafTestSupport;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.MavenUtils;
+import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+import static 
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class Spring43FeaturesTest extends KarafTestSupport {
-    
+
+    @Configuration
+    public Option[] config() {
+        String version = MavenUtils.getArtifactVersion("org.apache.karaf", 
"apache-karaf");
+        List<Option> result = new LinkedList<>(Arrays.asList(super.config()));
+        
result.add(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", 
"featuresRepositories",
+                "mvn:org.apache.karaf.features/framework/" + version + 
"/xml/features, " +
+                        "mvn:org.apache.karaf.features/spring/" + version + 
"/xml/features, " +
+                        "mvn:org.apache.karaf.features/spring-legacy/" + 
version + "/xml/features, " +
+                        "mvn:org.apache.karaf.features/enterprise/" + version 
+ "/xml/features, " +
+                        "mvn:org.apache.karaf.features/enterprise-legacy/" + 
version + "/xml/features, " +
+                        "mvn:org.apache.karaf.features/standard/" + version + 
"/xml/features"));
+        return result.toArray(new Option[result.size()]);
+    }
 
     @Test
     public void installSpringFeature() throws Exception {
diff --git 
a/itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
 
b/itests/src/test/java/org/apache/karaf/itests/features/Spring50FeaturesTest.java
similarity index 77%
copy from 
itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
copy to 
itests/src/test/java/org/apache/karaf/itests/features/Spring50FeaturesTest.java
index 5d5f7a5..3b6cb00 100644
--- 
a/itests/src/test/java/org/apache/karaf/itests/features/Spring43FeaturesTest.java
+++ 
b/itests/src/test/java/org/apache/karaf/itests/features/Spring50FeaturesTest.java
@@ -16,73 +16,81 @@ package org.apache.karaf.itests.features;
 import org.apache.karaf.itests.KarafTestSupport;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.MavenUtils;
+import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+import static 
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
-public class Spring43FeaturesTest extends KarafTestSupport {
-    
+public class Spring50FeaturesTest extends KarafTestSupport {
 
     @Test
     public void installSpringFeature() throws Exception {
-        installAssertAndUninstallFeature("spring", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringAspectsFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-aspects", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-aspects", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringInstrumentFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-instrument", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-instrument", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringJdbcFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-jdbc", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-jdbc", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringJmsFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-jms", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-jms", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringTestFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-test", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-test", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringOrmFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-orm", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-orm", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringOxmFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-oxm", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-oxm", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringTxFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-tx", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-tx", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringWebFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-web", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-web", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringWebPortletFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-web-portlet", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-web-portlet", 
System.getProperty("spring50.version"));
     }
 
     @Test
     public void installSpringWebSocketFeature() throws Exception {
-        installAssertAndUninstallFeature("spring-websocket", 
System.getProperty("spring43.version"));
+        installAssertAndUninstallFeature("spring-websocket", 
System.getProperty("spring50.version"));
     }
 
 }

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to