8000 Move the rest of TestingResource methods to a utils-shared helper class (2/2) by vaceksimon · Pull Request #49241 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Move the rest of TestingResource methods to a utils-shared helper class (2/2) - #49241

Merged
stianst merged 2 commits into
keycloak:mainfrom
vaceksimon:48942-Move-the-rest-of-TestingResource-methods-to-a-utils-shared-helper-class
May 27, 2026
Merged

stianst merged 2 commits into
keycloak:mainfrom
vaceksimon:48942-Move-the-rest-of-TestingResource-methods-to-a-utils-shared-helper-class

Conversation

@vaceksimon
@vaceksimon vaceksimon commented May 22, 2026 •
Copy link
Copy Markdown
Contributor

Closes: #48942

@vaceksimon vaceksimon added the area/test-framework Test framework — infrastructure, Realm DSL, page objects, migration utils label May 22, 2026
@vaceksimon
vaceksimon force-pushed the 48942-Move-the-rest-of-TestingResource-methods-to-a-utils-shared-helper-class branch 2 times, most recently from d11f301 to 5695c2b Compare May 22, 2026 14:47
@vaceksimon
vaceksimon marked this pull request as ready for review May 22, 2026 15:12
@vaceksimon
vaceksimon requested review from a team as code owners May 22, 2026 15:12
@vaceksimon
vaceksimon requested review from lhanusov and stianst May 22, 2026 15:13
@lhanusov lhanusov left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what is the reason, you are adding prepareGroupsLDAPTest into LDAPHelper and then Roles and similars to particular test classes?

@@ -78,4 +78,5 @@ public static RunOnServer clear() {
System.clearProperty(FILE);
};
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

probably accidently added to the commit. Should I remove it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed in the last commit

@@ -61,8 +62,8 @@ public void importTestRealms() {

// add an LDAP provider with a group mapper
Map<String, String> cfg = ldapRule.getConfig();
testingClient.testing().ldap(TEST_REALM_NAME).createLDAPProvider(cfg, true);
testingClient.testing().ldap(TEST_REALM_NAME).prepareGroupsLDAPTest();
runOnServer.fetchString(LdapHelper.createLDAPProvider(cfg, true));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't it be run?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, because createLDAPProvider returns a FetchOnServer functional interface and run accepts RunOnServer.

In other usages of this helper method, the resulting String is used; in this instance, it is ignored.

@vaceksimon
Copy link
Copy Markdown
Contributor Author

what is the reason, you are adding prepareGroupsLDAPTest into LDAPHelper and then Roles and similars to particular test classes?

prepareGroupsLDAPTest is used in three different classes, while the others are used only in that particular class.

@stianst stianst self-assigned this May 26, 2026
@vaceksimon
vaceksimon force-pushed the 48942-Move-the-rest-of-TestingResource-methods-to-a-utils-shared-helper-class branch from 5695c2b to 979b442 Compare May 26, 2026 08:34
@vaceksimon
vaceksimon requested a review from lhanusov May 26, 2026 08:39
…ss (2/2)

Closes: keycloak#48942

Signed-off-by: Simon Vacek <simonvacky@email.cz>
Signed-off-by: Simon Vacek <simonvacky@email.cz>
@stianst
stianst merged commit c272894 into keycloak:main May 27, 2026
89 of 91 checks passed
@vaceksimon
vaceksimon deleted the 48942-Move-the-rest-of-TestingResource-methods-to-a-utils-shared-helper-class branch May 27, 2026 07:08
@stianst stianst mentioned this pull request Jun 1, 2026
sashyo pushed a commit to tide-foundation/keycloak-IGA that referenced this pull request Jul 20, 2026
…ss (2/2) (keycloak#49241)

* Move the rest of TestingResource methods to a utils-shared helper class (2/2)

Closes: keycloak#48942

Signed-off-by: Simon Vacek <simonvacky@email.cz>

* review fix

Signed-off-by: Simon Vacek <simonvacky@email.cz>

---------

Signed-off-by: Simon Vacek <simonvacky@email.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test-framework Test framework — infrastructure, Realm DSL, page objects, migration utils flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the rest of TestingResource methods to a utils-shared helper class (2/2)

3 participants

0