This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-integration-tests.git
The following commit(s) were added to refs/heads/master by this push:
new 3750eb0 SLING-7636 - fix PostToRootTest
3750eb0 is described below
commit 3750eb05dc038544ba155d91de8991114077ac0c
Author: Bertrand Delacretaz <[email protected]>
AuthorDate: Thu May 3 18:23:12 2018 +0200
SLING-7636 - fix PostToRootTest
---
.../webapp/integrationtest/servlets/post/PostToRootTest.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git
a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java
b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java
index 6945c1e..6ac13a3 100644
---
a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java
+++
b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java
@@ -27,7 +27,13 @@ public class PostToRootTest extends HttpTestBase {
if(!url.endsWith("/")) {
url += "/";
}
- final PostMethod post = new PostMethod(url);
+
+ // Recent changes cause / to be "magic" at the end of an URL,
+ // we need an extension to be able to set a property on /
instead
+ // of creating content under it
+ url += ".json";
+
+ final PostMethod post = new PostMethod(url);
final String name = getClass().getSimpleName();
final String value = getClass().getSimpleName() +
System.currentTimeMillis();
post.addParameter(name, value);
@@ -35,7 +41,7 @@ public class PostToRootTest extends HttpTestBase {
final int status = httpClient.executeMethod(post);
assertEquals(200, status);
- final String json = getContent(url + ".json",
CONTENT_TYPE_JSON);
+ final String json = getContent(url, CONTENT_TYPE_JSON);
assertJavascript(value, json, "out.print(data." + name + ")");
}
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
[email protected].