You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2018/04/24 09:10:53 UTC
[sling-org-apache-sling-scripting-sightly-testing] branch master
updated: SLING-7615 - HTL integration tests should use authentication
This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git
The following commit(s) were added to refs/heads/master by this push:
new dc755d7 SLING-7615 - HTL integration tests should use authentication
dc755d7 is described below
commit dc755d752526d748b02b8b620247b4a925dbe5f2
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Apr 24 11:10:15 2018 +0200
SLING-7615 - HTL integration tests should use authentication
---
pom.xml | 2 ++
.../sling/scripting/sightly/it/SlingSpecificsSightlyIT.java | 10 ++++++----
.../sling/scripting/sightly/it/performance/PerformanceIT.java | 10 +++-------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/pom.xml b/pom.xml
index 776e802..723b448 100644
--- a/pom.xml
+++ b/pom.xml
@@ -180,6 +180,8 @@
</excludes>
<systemPropertyVariables>
<io.sightly.tck.serverURL>http://${test.host}:${http.port}</io.sightly.tck.serverURL>
+ <io.sightly.tck.user>admin</io.sightly.tck.user>
+ <io.sightly.tck.pass>admin</io.sightly.tck.pass>
<launchpad.http.server.url>http://${test.host}:${http.port}/</launchpad.http.server.url>
<launchpad.servlet.context>${http.base.path}</launchpad.servlet.context>
</systemPropertyVariables>
diff --git a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
index 979f2ef..3cdc495 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
@@ -21,21 +21,22 @@ package org.apache.sling.scripting.sightly.it;
import java.io.IOException;
import org.apache.http.client.HttpClient;
-import org.apache.http.client.entity.EntityBuilder;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.InputStreamBody;
-import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.sling.testing.clients.util.FormEntityBuilder;
import org.junit.BeforeClass;
import org.junit.Test;
+import io.sightly.tck.Constants;
import io.sightly.tck.html.HTMLExtractor;
import io.sightly.tck.http.Client;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
public class SlingSpecificsSightlyIT {
@@ -68,8 +69,9 @@ public class SlingSpecificsSightlyIT {
@BeforeClass
public static void init() {
- client = new Client();
launchpadURL = System.getProperty("launchpad.http.server.url");
+ client = new Client(System.getProperty(io.sightly.tck.Constants.SYS_PROP_USER, "admin"),
+ System.getProperty(io.sightly.tck.Constants.SYS_PROP_PASS, "admin"));
}
@Test
diff --git a/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java b/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java
index 614065a..855c2cf 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/it/performance/PerformanceIT.java
@@ -29,6 +29,7 @@ import org.junit.FixMethodOrder;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
+import io.sightly.tck.Constants;
import io.sightly.tck.http.Client;
/**
@@ -58,13 +59,8 @@ public class PerformanceIT {
*/
public PerformanceIT() {
serverURL = System.getProperty(Constants.SYS_PROP_SERVER_URL);
- String user = System.getProperty(Constants.SYS_PROP_USER);
- String password = System.getProperty(Constants.SYS_PROP_PASS);
- if (StringUtils.isNotEmpty(user) && StringUtils.isNotEmpty(password)) {
- client = new Client(user, password);
- } else {
- client = new Client();
- }
+ client = new Client(System.getProperty(io.sightly.tck.Constants.SYS_PROP_USER, "admin"),
+ System.getProperty(io.sightly.tck.Constants.SYS_PROP_PASS, "admin"));
}
/**
--
To stop receiving notification emails like this one, please contact
radu@apache.org.