-
Notifications
You must be signed in to change notification settings - Fork 7.9k
TestSuite PoC - Add support to configure lifecycle for realms and clients #31145
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 PoC - Add support to configure lifecycle for realms and clients #31145
Conversation
jonkoops
left a comment
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, just a couple of notes
...c/framework/src/main/java/org/keycloak/test/framework/server/KeycloakTestServerSupplier.java
Outdated
Show resolved
Hide resolved
test-poc/framework/src/main/java/org/keycloak/test/framework/injection/Registry.java
Outdated
Show resolved
Hide resolved
test-poc/base/src/test/java/org/keycloak/test/base/ManagedResourcesTest.java
Show resolved
Hide resolved
test-poc/base/src/test/java/org/keycloak/test/base/ManagedResources2Test.java
Show resolved
Hide resolved
3b00d66 to
897aca3
Compare
…ents Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
897aca3 to
290456e
Compare
jonkoops
left a comment
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
lhanusov
left a comment
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, thank you for your fast lifecycle adjustment 👍
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
Realms and clients can be set to global, class, or method. This needed a little bit of changes to the registry and suppliers around lifecycle management, including adding a way to destroy things with global lifecycle.
I may have even outsmarted myself when implementing the Registry as it actually works if a realm has method lifecycle, while the client has class (or global), as the client is re-created automatically if the realm is deleted.
I did not implement the optimalisation that we don't need to delete a client if a realm is being deleted, that can be done as a follow-up.
Closes #30610
Signed-off-by: stianst [email protected]