Merge pull request #3691 from vramik/migration-duplicate-emails
KEYCLOAK-4059 Added migration test
This commit is contained in:
commit
b1d9fd670a
1 changed files with 17 additions and 0 deletions
|
@ -78,6 +78,7 @@ public class MigrationTest extends AbstractKeycloakTest {
|
||||||
testMigrationTo2_1_0();
|
testMigrationTo2_1_0();
|
||||||
testMigrationTo2_2_0();
|
testMigrationTo2_2_0();
|
||||||
testMigrationTo2_3_0();
|
testMigrationTo2_3_0();
|
||||||
|
testMigrationTo2_5_0();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -85,6 +86,7 @@ public class MigrationTest extends AbstractKeycloakTest {
|
||||||
public void migration2_2_1Test() {
|
public void migration2_2_1Test() {
|
||||||
testMigratedData();
|
testMigratedData();
|
||||||
testMigrationTo2_3_0();
|
testMigrationTo2_3_0();
|
||||||
|
testMigrationTo2_5_0();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testMigratedData() {
|
private void testMigratedData() {
|
||||||
|
@ -135,6 +137,13 @@ public class MigrationTest extends AbstractKeycloakTest {
|
||||||
testUpdateProtocolMappers(masterRealm, migrationRealm);
|
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) {
|
private void testAuthorizationServices(RealmResource... realms) {
|
||||||
for (RealmResource realm : realms) {
|
for (RealmResource realm : realms) {
|
||||||
//test setup of authorization services
|
//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"));
|
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