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 2018/05/04 08:49:01 UTC
[sling-org-apache-sling-launchpad-integration-tests] branch master
updated: SLING-7636 - make AuthRequestLoginTest less brittle,
a 40x status on / is fine
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 eed4540 SLING-7636 - make AuthRequestLoginTest less brittle, a 40x status on / is fine
eed4540 is described below
commit eed4540af5ecf05a2ffc23e4541cc2a02da6d13c
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri May 4 10:48:49 2018 +0200
SLING-7636 - make AuthRequestLoginTest less brittle, a 40x status on / is fine
---
.../webapp/integrationtest/login/AuthRequestLoginTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AuthRequestLoginTest.java b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AuthRequestLoginTest.java
index 46daaf9..b716284 100644
--- a/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AuthRequestLoginTest.java
+++ b/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/login/AuthRequestLoginTest.java
@@ -41,12 +41,12 @@ public class AuthRequestLoginTest extends HttpTestBase {
assertJavascript("anonymous", content, "out.println(data.userID)");
}
- // root must return 20x or 30x
+ // root must return 20x, 30x or 40x
final GetMethod get = new GetMethod(HTTP_BASE_URL + "/");
final int status = httpClient.executeMethod(get);
- final int status10 = status / 10;
- if(status10 != 20 && status10 != 30) {
- fail("Expected 20x or 30x status, got " + status);
+ final int family = status / 10;
+ if(family < 20 || family > 40) {
+ fail("Expected 20x, 30x or 40x status at / with no credentials, got " + status);
}
// root with sling:authRequestLogin=true must return 401
--
To stop receiving notification emails like this one, please contact
bdelacretaz@apache.org.