+
Skip to content

Ported EnforcerConfigTest from Keycloak main. Improvements in testsui… #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

mposolda
Copy link
Contributor

@mposolda mposolda commented Aug 9, 2024

…te to be better able to handle lifecycle of components

closes keycloak/keycloak#31979

  • PR introduces authz-tests module and adds EnforcerConfigTest from the Keycloak testsuite. Hope other policy enforcer tests can be added as a follow-up (See parent issue of EnforcerConfigTest keycloak#31979 )

  • Did some updates in the testsuite to make Keycloak server being executed just once per testsuite run (Currently it is separate run per all admin-client-tests, admin-client-jee-tests and authz-tests as it is separate JVM run of maven-surefire-plugin per each of the modules, but I hope we will have just those 3 modules and hence 3 runs of the Keycloak server per the testsuite run, which should be OK).

  • For this, I've introduced junit jupiter extension KeycloakClientTestExtension and some related classes like TestRegistry . It allows to specify the "lifecycle" of the components, so for example Keycloak-server is executed just once per the testsuite, when admin-client is started/stopped once per every test class. The realms are imported also once per test class (Similar approach like Keycloak main testsuite).

  • I've temporarily removed the 24.0 from the runs of the testsuite. The reason is, that it is not possible to import the realm with latest keycloak-admin-client to the Keycloak 24 server due this issue Not possible to import realm with newest Java admin-client against Keycloak 24  keycloak#32025 . Hopefully we can add it back once this is sorted.

…te to be better able to handle lifecycle of components

closes keycloak/keycloak#31979

Signed-off-by: mposolda <mposolda@gmail.com>
@mposolda mposolda self-assigned this Aug 9, 2024
Copy link
Contributor

@rmartinc rmartinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is taking shape! 😄
Just one question, if we are trying to go to junit5 in other projects maybe it's good to start this project with junit5 (now you are adding junit4 customizations). Or are there known limitations?

@pskopek
Copy link
Collaborator

pskopek commented Aug 9, 2024

It looks good to me. Thanks Marek!

@mposolda mposolda merged commit 42852ce into keycloak:main Aug 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EnforcerConfigTest
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载