Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Testing PaxExam 3.1.0
-
None
-
None
Description
Eric Norman has written utilities in the jackrabbit-accessmanager/AccessManagerClientTestSupport class that I think would fit well as helpers in the testing-paxeam module. This can help us move more tests away from the bigĀ launchpad-integration-tests module, closer to the code that they test, as done in SLING-10437
I don't have time to implement this right now, so consider this ticket as a reminder to myself to do it later in my Copious Free Time. Or if someone wants to go ahead feel free to reassign this ticket to yourself.
A suggested usage scenario is getting a configured HttpClient starting with a BundleContext. To test it, it should allow for simplifying that AccessManagerClientTestSupport class by removing all the HttpClient setup code and making that reusable in the new helper.
To simplify the Credentials handling, as we are often reusing the same ones, the HttpClient might store several named Credentials and include a useCredentials method which sets one of them as the default for the next requests.
The client configuration is mostly in the before method of that class, with getBaseServerUri computing the server URL from the OSGi configs.
The jackrabbit-usermanager module has a similar ClientTestSupport class that would also benefit from the same refactorings.
Attachments
Issue Links
- relates to
-
SLING-10436 Move jackrabbit-accessmanager integration tests
- Closed
-
SLING-10437 Move jackrabbit-usermanager integration tests
- Closed