TestSuite PoC - Add support to configure lifecycle for realms and clients#31145
Merged
stianst merged 1 commit intokeycloak:mainfrom Jul 9, 2024
Merged
Conversation
jonkoops
previously approved these changes
Jul 9, 2024
Contributor
jonkoops
left a comment
There was a problem hiding this comment.
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
lhanusov
approved these changes
Jul 9, 2024
Contributor
lhanusov
left a comment
There was a problem hiding this comment.
LGTM, thank you for your fast lifecycle adjustment 👍
miquelsi
approved these changes
Jul 9, 2024
stianst
added a commit
to stianst/keycloak
that referenced
this pull request
Jul 9, 2024
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
stianst
added a commit
to stianst/keycloak
that referenced
this pull request
Jul 9, 2024
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
stianst
added a commit
to stianst/keycloak
that referenced
this pull request
Jul 9, 2024
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
Captain-P-Goldfish
pushed a commit
to Captain-P-Goldfish/keycloak
that referenced
this pull request
Jul 17, 2024
…ents (keycloak#31145) Closes keycloak#30610 Signed-off-by: stianst <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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]