Added migration for KEYCLOAK-4059
This commit is contained in:
parent
2ba21485f9
commit
bb00524f94
1 changed files with 17 additions and 0 deletions
|
@ -78,6 +78,7 @@ public class MigrationTest extends AbstractKeycloakTest {
|
|||
testMigrationTo2_1_0();
|
||||
testMigrationTo2_2_0();
|
||||
testMigrationTo2_3_0();
|
||||
testMigrationTo2_5_0();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -85,6 +86,7 @@ public class MigrationTest extends AbstractKeycloakTest {
|
|||
public void migration2_2_1Test() {
|
||||
testMigratedData();
|
||||
testMigrationTo2_3_0();
|
||||
testMigrationTo2_5_0();
|
||||
}
|
||||
|
||||
private void testMigratedData() {
|
||||
|
@ -135,6 +137,13 @@ public class MigrationTest extends AbstractKeycloakTest {
|
|||
testUpdateProtocolMappers(masterRealm, migrationRealm);
|
||||
}
|
||||
|
||||
private void testMigrationTo2_5_0() {
|
||||
//TODO org.keycloak.migration.migrators.MigrateTo2_5_0
|
||||
|
||||
//https://github.com/keycloak/keycloak/pull/3630
|
||||
testDuplicateEmailSupport(masterRealm, migrationRealm);
|
||||
}
|
||||
|
||||
private void testAuthorizationServices(RealmResource... realms) {
|
||||
for (RealmResource realm : realms) {
|
||||
//test setup of authorization services
|
||||
|
@ -214,4 +223,12 @@ public class MigrationTest extends AbstractKeycloakTest {
|
|||
protocolMapper.getConfig().get("id.token.claim"), protocolMapper.getConfig().get("userinfo.token.claim"));
|
||||
}
|
||||
}
|
||||
|
||||
private void testDuplicateEmailSupport(RealmResource... realms) {
|
||||
for (RealmResource realm : realms) {
|
||||
RealmRepresentation rep = realm.toRepresentation();
|
||||
assertTrue("LoginWithEmailAllowed should be enabled.", rep.isLoginWithEmailAllowed());
|
||||
assertFalse("DuplicateEmailsAllowed should be disabled.", rep.isDuplicateEmailsAllowed());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue