diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/AggregatePolicyManagementTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/AggregatePolicyManagementTest.java index a38390a9c6..78bc5c6b46 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/AggregatePolicyManagementTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/AggregatePolicyManagementTest.java @@ -32,6 +32,7 @@ import org.keycloak.admin.client.resource.RealmResource; import org.keycloak.admin.client.resource.RolePoliciesResource; import org.keycloak.admin.client.resource.RolesResource; import org.keycloak.admin.client.resource.UsersResource; +import org.keycloak.common.Profile; import org.keycloak.common.Version; import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.authorization.AggregatePolicyRepresentation; @@ -231,19 +232,21 @@ public class AggregatePolicyManagementTest extends AbstractAuthorizationSettings policy.createPolicy(childTimePolicy); expected.addPolicy(childTimePolicy.getName()); - RulePolicyRepresentation rulePolicy = new RulePolicyRepresentation(); + if (Profile.isFeatureEnabled(Profile.Feature.AUTHZ_DROOLS_POLICY)) { + RulePolicyRepresentation rulePolicy = new RulePolicyRepresentation(); - rulePolicy.setName(UUID.randomUUID().toString()); - rulePolicy.setDescription("description"); - rulePolicy.setArtifactGroupId("org.keycloak.testsuite"); - rulePolicy.setArtifactId("photoz-authz-policy"); - rulePolicy.setArtifactVersion(Version.VERSION); - rulePolicy.setModuleName("PhotozAuthzOwnerPolicy"); - rulePolicy.setSessionName("MainOwnerSession"); - rulePolicy.setScannerPeriod("1"); - rulePolicy.setScannerPeriodUnit("Minutes"); - policy.createPolicy(rulePolicy); - expected.addPolicy(rulePolicy.getName()); + rulePolicy.setName(UUID.randomUUID().toString()); + rulePolicy.setDescription("description"); + rulePolicy.setArtifactGroupId("org.keycloak.testsuite"); + rulePolicy.setArtifactId("photoz-authz-policy"); + rulePolicy.setArtifactVersion(Version.VERSION); + rulePolicy.setModuleName("PhotozAuthzOwnerPolicy"); + rulePolicy.setSessionName("MainOwnerSession"); + rulePolicy.setScannerPeriod("1"); + rulePolicy.setScannerPeriodUnit("Minutes"); + policy.createPolicy(rulePolicy); + expected.addPolicy(rulePolicy.getName()); + } GroupPolicyRepresentation childGroupPolicy = new GroupPolicyRepresentation();