Testsuite of keycloak-admin-client in keycloak-client repository #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes keycloak/keycloak#31867
Adding 1st version of the testsuite for the
keycloak-admin-client
andkeycloak-admin-client-jee
in the keycloak-client repository.Testsuite uses white-box approach. The aim is to not have any dependencies on keycloak to avoid clash of the classes of
keycloak-client
modules with the Keycloak classes.Keycloak server start/stop is based on testcontainers and by default, which is the approach we discussed with Stian as possible way to go. It is running the Keycloak server inside docker image. It introduces dependency on
keycloak-testcontainers
, which is 3rd party library, but should be OK since it is just for testing purposes. Was also thinking about forking that (just around 3 classes), but added depenency for now.So far, the server is executed separately for each test class, but this may be improved as a follow-up to possibly run the server for the whole testsuite
Ability to run the testsuite against Keycloak server, which is executed locally (In this case, testsuite won't start/stop Keycloak server). Can be faster turnaround or possibility to easily debug Keycloak server if needed
The hope is to not duplicate test classes for
keycloak-admin-client
andkeycloak-admin-client-jee
and re-use them as much as possible.Possible follow-up tasks:
Ability to test with different versions of Keycloak server. Test with last 2 versions of Keycloak server (so 24 and 25) + Keycloak nightly in GH actions
Add more tests (or investigate if we can re-use the tests from the package
org.keycloak.testsuite.admin
from Keycloak testsuite, but does not seem feasible to me ATM)