SLING-1157 apply testing extension supporting WAR bundles (another thanks to Justin Edelson for providing)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@884076 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index fdff834..950f496 100644
--- a/pom.xml
+++ b/pom.xml
@@ -222,7 +222,7 @@
</outputDirectory>
<excludeTransitive>true</excludeTransitive>
<includeArtifactIds>
- org.apache.sling.launchpad.test-services
+ org.apache.sling.launchpad.test-services,org.apache.sling.launchpad.test-services-war
</includeArtifactIds>
<includeScope>
provided
@@ -441,7 +441,7 @@
</configuration>
</plugin>
</plugins>
- </build>
+ </build>
</profile>
</profiles>
@@ -500,6 +500,13 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.launchpad.test-services-war</artifactId>
+ <version>2.0.7-SNAPSHOT</version>
+ <type>war</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.2</version>
diff --git a/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/ResolutionTestBase.java b/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/ResolutionTestBase.java
index 387391b..02511d2 100644
--- a/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/ResolutionTestBase.java
+++ b/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/ResolutionTestBase.java
@@ -35,6 +35,7 @@
public static final String EXT_SERVLET_SUFFIX = "testservices.servlets.ExtensionServlet";
public static final String SEL_SERVLET_SUFFIX = "testservices.servlets.SelectorServlet";
+ public static final String WAR_SEL_SERVLET_SUFFIX = "testservices.war.servlets.SelectorServlet";
public static final String PREFIX_0_SERVLET_SUFFIX = "testservices.servlets.PrefixServletZero";
public static final String PREFIX_M1_SERVLET_SUFFIX = "testservices.servlets.PrefixServletMinusOne";
public static final String PUT_SERVLET_SUFFIX = "testservices.servlets.PutMethodServlet";
diff --git a/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/WarSelectorServletTest.java b/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/WarSelectorServletTest.java
new file mode 100644
index 0000000..981a2a9
--- /dev/null
+++ b/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/WarSelectorServletTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.sling.launchpad.webapp.integrationtest.servlets.resolution;
+
+/** Test the SelectorServlet provided by the WAR test services bundle. */
+public class WarSelectorServletTest extends ResolutionTestBase {
+
+ public void testSelectorOne() throws Exception {
+ assertServlet(
+ getContent(testNodeNORT.nodeUrl + ".WAR_TEST_SEL_1.txt", CONTENT_TYPE_PLAIN),
+ WAR_SEL_SERVLET_SUFFIX);
+ }
+
+ public void testSelectorTwo() throws Exception {
+ assertServlet(
+ getContent(testNodeNORT.nodeUrl + ".WAR_TEST_SEL_2.txt", CONTENT_TYPE_PLAIN),
+ WAR_SEL_SERVLET_SUFFIX);
+ }
+
+ public void testSelectorOther() throws Exception {
+ assertNotTestServlet(
+ getContent(testNodeNORT.nodeUrl + ".WAR_TEST_SEL_3.txt", CONTENT_TYPE_PLAIN));
+ }
+}