karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [2/2] karaf git commit: Fix Spring 4.2.x features itest
Date Fri, 27 Jan 2017 16:40:01 GMT
Fix Spring 4.2.x features itest


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/9864fb5e
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/9864fb5e
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/9864fb5e

Branch: refs/heads/master
Commit: 9864fb5e02a7fa3235051cc82fe6380700854f9c
Parents: 90ef2e8
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Fri Jan 27 17:38:03 2017 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Fri Jan 27 17:39:44 2017 +0100

----------------------------------------------------------------------
 .../itests/features/Spring42FeaturesTest.java   | 24 +++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/9864fb5e/itests/src/test/java/org/apache/karaf/itests/features/Spring42FeaturesTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/features/Spring42FeaturesTest.java
b/itests/src/test/java/org/apache/karaf/itests/features/Spring42FeaturesTest.java
index 1a8f31f..c08578e 100644
--- a/itests/src/test/java/org/apache/karaf/itests/features/Spring42FeaturesTest.java
+++ b/itests/src/test/java/org/apache/karaf/itests/features/Spring42FeaturesTest.java
@@ -18,14 +18,36 @@ 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 Spring42FeaturesTest 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 {


Mime
View raw message