-
Notifications
You must be signed in to change notification settings - Fork 15
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
Testsuite of keycloak-admin-client in keycloak-client repository #16
Conversation
29f3e98
to
40129bd
Compare
closes keycloak/keycloak#31867 Signed-off-by: mposolda <mposolda@gmail.com>
40129bd
to
e42f69e
Compare
@mposolda IMHO using test-containers is very good idea. So I like the approach in this PR. But I really hate to repeat the tests for |
…lient-jee-tests Signed-off-by: mposolda <mposolda@gmail.com>
@rmartinc Thanks for the feedback! I've updated this PR (used separate commit just for the easier review, so you can easily see the changes). I've updated this to:
I've kept only WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @mposolda! Probably we'll need more tuning as long as we create more tests classes, but it's a very nice starting point.
@rmartinc Thanks! I am merging (I already have some WiP on the follow-up for the ability to test nightly builds with more Keycloak versions). Agree that we will need more tuning and improvements (like EG don't require to start/stop the server for every test etc). |
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)