-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Move PartialImportTest.java to the new testsuite #40279
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
base: main
Are you sure you want to change the base?
Conversation
Part of: keycloak#34494 Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
protected ClientResource clientRolesClient() { | ||
return ApiUtil.findClientResourceByName(managedRealm.admin(), CLIENT_ROLES_CLIENT); | ||
} |
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.
This method can be replaced with rolesClient.admin()
@Test | ||
public void testOverwriteExistingClientWithServiceAccount() { | ||
setOverwrite(); | ||
piRep.setClients(Collections.singletonList(managedRealm.admin().clients().findByClientId(CLIENT_SERVICE_ACCOUNT).get(0))); |
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.
piRep.setClients(Collections.singletonList(managedRealm.admin().clients().findByClientId(CLIENT_SERVICE_ACCOUNT).get(0))); | |
piRep.setClients(Collections.singletonList(serviceClient.admin().toRepresentation())); |
ClientRepresentation client = managedRealm.admin().clients().findByClientId(CLIENT_SERVICE_ACCOUNT).get(0); | ||
managedRealm.admin().clients().get(client.getId()).getServiceAccountUser(); |
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.
ClientRepresentation client = managedRealm.admin().clients().findByClientId(CLIENT_SERVICE_ACCOUNT).get(0); | |
managedRealm.admin().clients().get(client.getId()).getServiceAccountUser(); | |
serviceClient.admin().getServiceAccountUser(); |
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.
Looking at this, I realized how little we use assertDoesNotThrow
. Or actually only twice in all the tests. Why is it not used? Wouldn't it make it clearer what should and shouldn't happen?
Part of: #34494