Initial tests for admin-client #36
Merged
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.
First PR to add admin-client tests from keycloak repository to keycloak-client repository:
Keycloak
admin client class copied into the testsuite to add some useful methods, synced some classes fromkeycloak-server-spi
andkeycloak-server-spi-private
into the admin client such asConstants
andStringUtil
. Is this okay, or is it better to copy them into the testsuite?Other classes like
CibaConfig
,OAuth2DeviceConfig
, andParConfig
instead have been simplified and copied directly into the testsuite due too many dependencies, for example withRealmModel
,KeycloakSession
, and many others that are currently unnecessary to synchronize.Created
AbstractAdminClientTest
which imports the default realms and injects theadminClient
and theoauthClient
.Created the annotation
@KeycloakVersion
, which takesmin
and/ormax
values (i.e.@KeycloakVersion(min="25.0.0")
) to use on test methods to run the test only on specific Keycloak versions.So far, only the tests
AdminClientTest
,RealmTest
,RealmRolesTest
, andClientTest
have been migrated.Assertions on admin events have been removed.
Tests strictly related to operations that require the use of
KeycloakTestingClient
and then related to the testing resource provider (such as run on server) have been removed or modified.Closes keycloak/keycloak#31869