diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/AbstractPhotozExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/AbstractPhotozExampleAdapterTest.java
index 2f9fede0ac..7223b2abcf 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/AbstractPhotozExampleAdapterTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/AbstractPhotozExampleAdapterTest.java
@@ -88,13 +88,6 @@ public abstract class AbstractPhotozExampleAdapterTest extends AbstractExampleAd
@Before
public void beforePhotozExampleAdapterTest() throws FileNotFoundException {
deleteAllCookiesForClientPage();
-
- for (PolicyRepresentation policy : getAuthorizationResource().policies().policies()) {
- if ("Only Owner Policy".equals(policy.getName())) {
- policy.getConfig().put("mavenArtifactVersion", System.getProperty("project.version"));
- getAuthorizationResource().policies().policy(policy.getId()).update(policy);
- }
- }
}
@Override
@@ -650,7 +643,13 @@ public abstract class AbstractPhotozExampleAdapterTest extends AbstractExampleAd
}
private void importResourceServerSettings() throws FileNotFoundException {
- getAuthorizationResource().importSettings(loadJson(new FileInputStream(new File(TEST_APPS_HOME_DIR + "/photoz/photoz-restful-api-authz-service.json")), ResourceServerRepresentation.class));
+ ResourceServerRepresentation authSettings = loadJson(new FileInputStream(new File(TEST_APPS_HOME_DIR + "/photoz/photoz-restful-api-authz-service.json")), ResourceServerRepresentation.class);
+
+ authSettings.getPolicies().stream()
+ .filter(x -> "Only Owner Policy".equals(x.getName()))
+ .forEach(x -> x.getConfig().put("mavenArtifactVersion", System.getProperty("project.version")));
+
+ getAuthorizationResource().importSettings(authSettings);
}
private AuthorizationResource getAuthorizationResource() throws FileNotFoundException {
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/authorization/EAPServletAuthzAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/authorization/EAPServletAuthzAdapterTest.java
index 8355037f1c..0ff9905fd8 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/authorization/EAPServletAuthzAdapterTest.java
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/authorization/EAPServletAuthzAdapterTest.java
@@ -17,7 +17,6 @@
package org.keycloak.testsuite.adapter.example.authorization;
import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.keycloak.testsuite.adapter.example.authorization.AbstractServletAuthzAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
@@ -27,6 +26,6 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
@RunAsClient
@AppServerContainer("app-server-eap")
//@AdapterLibsLocationProperty("adapter.libs.wildfly")
-public class EAPServletAuthzAdapterTest extends AbstractServletAuthzAdapterTest {
+public class EAPServletAuthzAdapterTest extends AbstractServletAuthzFunctionalAdapterTest {
}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/pom.xml
index 6cfc621f24..8250a34dde 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/adapters/pom.xml
@@ -68,6 +68,7 @@
10399
+
@@ -81,6 +82,7 @@
-Djava.security.krb5.conf=${project.build.directory}/dependency/kerberos/test-krb5.conf
-Dkie.maven.settings.custom=${settings.path}
-Drepo.url=${repo.url}
+ -Dmaven.repo.local=${maven.repo.local}
${containers.home}/app-server-${app.server}