[keycloak-dev] Testing a custom Provider
Youssef EL HOUTI
youssef.elhouti at gmail.com
Thu Mar 8 19:11:12 EST 2018
Hi Martin,
These two examples are a bit confusing for someone starting with arquillian, but thanks for pointing me to them, they’ve been a good starting point.
I finally managed to understand how arquillian works and make some tests.
For any one interested here is the module: https://github.com/cloudtrust/keycloak-export <https://github.com/cloudtrust/keycloak-export>
Thanks again for the help
Bests
> On 23 Feb 2018, at 08:35, Martin Kanis <mkanis at redhat.com> wrote:
>
> Hi Youssef,
>
> try to have a look to Keycloak quickstarts repository [1][2] where you can find an examples how to test providers.
>
> Hope this helps you.
>
> Martin
>
> [1] https://github.com/keycloak/keycloak-quickstarts/blob/latest/action-token-authenticator/src/test/java/org/keycloak/quickstart/ArquillianActionTokenWithAuthenticatorTest.java <https://github.com/keycloak/keycloak-quickstarts/blob/latest/action-token-authenticator/src/test/java/org/keycloak/quickstart/ArquillianActionTokenWithAuthenticatorTest.java>
> [2] https://github.com/keycloak/keycloak-quickstarts/blob/latest/action-token-required-action/src/test/java/org/keycloak/quickstart/ArquillianActionTokenTest.java <https://github.com/keycloak/keycloak-quickstarts/blob/latest/action-token-required-action/src/test/java/org/keycloak/quickstart/ArquillianActionTokenTest.java>
>
> On Fri, Feb 23, 2018 at 7:27 AM, Youssef EL HOUTI <youssef.elhouti at gmail.com <mailto:youssef.elhouti at gmail.com>> wrote:
> Hi,
>
> I'm building a custom RealmResourceProvider to be able run a full realm
> export and import while the app is running. Since these are sensitive
> tasks, I want to secure the endpoint. I think i managed to do that by
> "copying" what is done with the adminResource.
> Now I want to (integration) test my custom provider
> How should proceed to build tests like the ones available in the test suite
> (using: AbstractKeycloakTest)
>
> Also is this the right approach?
>
> Things I would like to test:
> User is connected to master and has create-realm role to be able to import
> new realm
> User is importing from the realm specified in the file to avoid mistakes
> User has the role manage-realm to be able to import...
> ...
>
> Thanks for your help
>
> Youssef
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org <mailto:keycloak-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/keycloak-dev <https://lists.jboss.org/mailman/listinfo/keycloak-dev>
>
More information about the keycloak-dev
mailing list