KEYCLOAK-4128 ResourcePermissionManagementTest fails on Oracle DB
This commit is contained in:
parent
3e8d4e4eb6
commit
c998198aac
2 changed files with 4 additions and 2 deletions
|
@ -168,7 +168,7 @@ public class JPAPolicyStore implements PolicyStore {
|
|||
|
||||
@Override
|
||||
public List<Policy> findByResourceType(final String resourceType, String resourceServerId) {
|
||||
Query query = getEntityManager().createQuery("select p from PolicyEntity p inner join p.config c where p.resourceServer.id = :serverId and KEY(c) = 'defaultResourceType' and c = :type");
|
||||
Query query = getEntityManager().createQuery("select p from PolicyEntity p inner join p.config c where p.resourceServer.id = :serverId and KEY(c) = 'defaultResourceType' and c like :type");
|
||||
|
||||
query.setParameter("serverId", resourceServerId);
|
||||
query.setParameter("type", resourceType);
|
||||
|
|
|
@ -99,11 +99,13 @@ public abstract class AbstractAuthorizationTest {
|
|||
}
|
||||
|
||||
protected Invocation.Builder newClient(ClientModel client, String authzRelativePath) {
|
||||
String targetUrl = AUTH_SERVER_ROOT + "/admin/realms/" + TEST_REALM_NAME + "/clients/" + client.getId() + "/authz" + authzRelativePath;
|
||||
|
||||
return ClientBuilder.newClient()
|
||||
.register((ClientRequestFilter) requestContext -> {
|
||||
AccessTokenResponse accessToken = adminClient.tokenManager().getAccessToken();
|
||||
requestContext.getHeaders().add("Authorization", "Bearer " + accessToken.getToken());
|
||||
}).target(AUTH_SERVER_ROOT + "/admin/realms/" + TEST_REALM_NAME + "/clients/" + client.getId() + "/authz" + authzRelativePath).request();
|
||||
}).target(targetUrl).request();
|
||||
}
|
||||
|
||||
protected ClientModel getClientByClientId(String clientId) {
|
||||
|
|
Loading…
Reference in a new issue