From 218065a3493be79c60cb003583c1cb32856e2a1d Mon Sep 17 00:00:00 2001 From: mhajas Date: Wed, 19 Oct 2016 10:27:53 +0200 Subject: [PATCH] KEYCLOAK-3654 Fix jwks-url in integration-arquillian --- .../org/keycloak/testsuite/adapter/AbstractAdapterTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java index 4317317908..a42234c565 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java @@ -80,7 +80,9 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { private void modifyClientJWKSUrl(RealmRepresentation realm, String regex, String replacement) { if (realm.getClients() != null) { - realm.getClients().stream().filter(client -> "client-jwt".equals(client.getClientAuthenticatorType())).forEach(client -> { + realm.getClients().stream(). + filter(client -> "client-jwt".equals(client.getClientAuthenticatorType()) && client.getAttributes().containsKey("jwks.url")). + forEach(client -> { Map attr = client.getAttributes(); attr.put("jwks.url", attr.get("jwks.url").replaceFirst(regex, replacement)); client.setAttributes(attr);