Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Apache Sling Testing Clients 2.0.8
-
None
Description
When testing functionality in Apache Sling applications it is often required to use non-administrative users to ensure the functionality works for less-privileged users or to test privilege-limited features.
With the current functionality in Sling Testing Clients, this means opening a new SlingClient instance for the administrative and non-administrative users. This can cause issues if the instances are load-balanced between a topology of instances with eventual consistency as the two clients are not guaranteed to be routed to the same instance.
Therefore, it would desirable to be able to impersonate another user, using the same administrative Sling Testing Client, using the sling.sudo cookie to impersonate the desired user from admin so that the same testing client would be used, avoiding significant increases in complexity and execution time in tests in needing to wait until the instances are consistent.