You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2015/08/31 16:36:46 UTC

[jira] [Commented] (SLING-4979) commons.testing.util.RepositoryUtil should allow to instantiate a SlingRepository where loginService is supported

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

Robert Munteanu commented on SLING-4979:
----------------------------------------

Maybe you can use the Sling/JCR mocks instead?

> 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)