Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
org.apache.sling.testing.tools 1.0.6
-
None
Description
I was using SlingTestBase class and was trying to run the tests against a hosted CQ server. I am not using a standard "Admin/admin" username/password and the base class was not initializing. Upon debugging the code, i noticed the following potential bug (unless you can tell me how to override this).
public void checkBundleInstalled(String symbolicName, int timeoutSeconds) { final String path = getBundlePath(symbolicName, ".json"); new RetryingContentChecker(executor, builder).check(path, 200, timeoutSeconds, 500); }
Note that this class is calling the RetryingContentChecker without a username and password. This calls the constructor as follows
public RetryingContentChecker(RequestExecutor executor, RequestBuilder builder) { this(executor, builder, null, SlingTestBase.ADMIN); } public RetryingContentChecker(RequestExecutor executor, RequestBuilder builder, String username, String password) { this.executor = executor; this.builder = builder; if (username != null) { this.username = username; } else { this.username = SlingTestBase.ADMIN; } if (password != null) { this.password = password; } else { this.password = SlingTestBase.ADMIN; } }
I you read the logic, even though I have passed my password in system properties, the default password "Admin" gets set and the connection to my hosted server doesnt work and this fails for me.
I really need this to be fixed and may try to provide a patch, but i need to know if i invest the time to setup the development environment on my local machine - checkout, compile, pass test cases, understand how the lifecycle works for you, how soon can a patch build be released to maven repository so that i can use that JAR. If that's not going to happen soon, i will just override classes locally for now.
thanks
Attachments
Issue Links
- is duplicated by
-
SLING-2429 Testing tools: Hardcoded credentials in RetryingContentChecker
- Resolved