[ 
https://issues.apache.org/jira/browse/SLING-4979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725075#comment-14725075
 ] 

Tommaso Teofili commented on SLING-4979:
----------------------------------------

yes, that's an option, just for users of commons.testing it'd require changing 
dependencies and tests code, but I guess mocks is receiving more attention 
lately so it would be good to switch to it anyway.

> commons.testing.util.RepositoryUtil should allow to instantiate a 
> SlingRepository where loginService is supported
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-4979
>                 URL: https://issues.apache.org/jira/browse/SLING-4979
>             Project: Sling
>          Issue Type: Wish
>          Components: Commons
>    Affects Versions: Commons Testing 2.0.18
>            Reporter: Tommaso Teofili
>             Fix For: Commons Testing 2.0.20
>
>
> When using _org.apache.sling.commons.testing_ (2.0.18) and trying to call 
> loginService on the returned {{SlingRepository}} results in an exception as 
> the API has not been updated to support such kind of calls, while it'd be 
> nice to be able also to test a class (e.g. a service) using _loginService_ to 
> authenticate.
> However I understand that it might be complicated to inject which services 
> can do what, or at least it may be not too useful as the candidate test 
> classes wanting to use such a repository would use services according to how 
> mappings have been defined... Maybe we could offer 1 or 2 services that are 
> enabled (admin / anonymous like).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to