You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2016/08/03 11:13:54 UTC

svn commit: r1755067 - in /sling/trunk/launchpad: integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/ test-services/src/main/resources/SLING-INF/content/

Author: bdelacretaz
Date: Wed Aug  3 11:13:54 2016
New Revision: 1755067

URL: http://svn.apache.org/viewvc?rev=1755067&view=rev
Log:
SLING-5866 - use test content from test-services bundle

Added:
    sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/sling-logo.png   (with props)
    sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/some.html
Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/HeadServletTest.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/HeadServletTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/HeadServletTest.java?rev=1755067&r1=1755066&r2=1755067&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/HeadServletTest.java (original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/HeadServletTest.java Wed Aug  3 11:13:54 2016
@@ -39,11 +39,11 @@ public class HeadServletTest {
 
     private final HttpTest H = new HttpTest();
     
-    /** Assumes the default Sling content is present */
-    public static final String HTML_URL = HttpTestBase.HTTP_BASE_URL + "/index.html";
+    /** Test content provided by the test-services bundle */
+    public static final String HTML_URL = HttpTestBase.HTTP_BASE_URL + "/sling-test/some.html";
     
-    /** Assumes the default Sling content is present */
-    public static final String PNG_URL = HttpTestBase.HTTP_BASE_URL + "/sling-logo.png";
+    /** Test content provided by the test-services bundle */
+    public static final String PNG_URL = HttpTestBase.HTTP_BASE_URL + "/sling-test/sling-logo.png";
     
     private void assertResponseHeader(HttpMethod m, String name, String expectedRegex) {
         final Header h = m.getResponseHeader(name);
@@ -72,7 +72,7 @@ public class HeadServletTest {
     @Test
     public void htmlGet() throws IOException {
         final String content = H.getContent(HTML_URL, HttpTest.CONTENT_TYPE_HTML);
-        assertTrue("Expecting non-empty content with GET request", content.trim().length() > 0); 
+        HttpTest.assertContains(content, "This is some HTML for testing Sling.");
     }
     
     @Test

Added: sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/sling-logo.png
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/sling-logo.png?rev=1755067&view=auto
==============================================================================
Binary file - no diff available.

Propchange: sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/sling-logo.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/some.html
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/some.html?rev=1755067&view=auto
==============================================================================
--- sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/some.html (added)
+++ sling/trunk/launchpad/test-services/src/main/resources/SLING-INF/content/some.html Wed Aug  3 11:13:54 2016
@@ -0,0 +1,21 @@
+<!--
+/*
+ * 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.
+ */
+-->
+<html>
+This is some HTML for testing Sling.
+</html>