From ae29e36e1f25af1a640f563c51d2880e2961c0b0 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Wed, 22 Nov 2017 08:19:30 -0500 Subject: [PATCH] fix my stupidity --- .../migration/AbstractJsonFileImportMigrationTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/migration/AbstractJsonFileImportMigrationTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/migration/AbstractJsonFileImportMigrationTest.java index 37eb6311c5..ce5965904a 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/migration/AbstractJsonFileImportMigrationTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/migration/AbstractJsonFileImportMigrationTest.java @@ -44,7 +44,7 @@ public abstract class AbstractJsonFileImportMigrationTest extends AbstractMigrat // hack to reuse AbstractMigrationTest need to create a bunch of stuff in master realm for tests to work - + RoleRepresentation newRole = new RoleRepresentation(); newRole.setName("master-test-realm-role"); @@ -54,7 +54,8 @@ public abstract class AbstractJsonFileImportMigrationTest extends AbstractMigrat masterRealm.clients().create(newClient); newClient = masterRealm.clients().findByClientId("master-test-client").get(0); newRole.setName("master-test-client-role"); - masterRealm.clients().get(newClient.getId()).roles().create(newRole); + masterTestClientId = newClient.getId(); + masterRealm.clients().get(masterTestClientId).roles().create(newRole); for (GroupRepresentation group : masterRep.getGroups()) { group.setId(null); @@ -70,7 +71,7 @@ public abstract class AbstractJsonFileImportMigrationTest extends AbstractMigrat public void afterMigrationTest() { masterRealm.clients().get(masterTestClientId).remove(); masterRealm.roles().get("master-test-realm-role").remove(); - GroupRepresentation group = masterRealm.getGroupByPath("/migration-test-group"); + GroupRepresentation group = masterRealm.getGroupByPath("/master-test-group"); masterRealm.groups().group(group.getId()).remove(); UserRepresentation user = masterRealm.users().search("master-test-user").get(0); masterRealm.users().get(user.getId()).remove();