Upgrade old Keycloak version for DB migration tests (#29884)
Closes #29883 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
parent
66ef3bf2d7
commit
d396dfed6a
4 changed files with 5891 additions and 10 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -763,7 +763,7 @@ jobs:
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
old-version: [19.0.3]
|
old-version: [24.0.4]
|
||||||
database: [postgres, mysql, oracle, mssql, mariadb]
|
database: [postgres, mysql, oracle, mssql, mariadb]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -177,15 +177,7 @@ public class KeycloakQuarkusServerDeployableContainer extends AbstractQuarkusDep
|
||||||
private ProcessBuilder getProcessBuilder() {
|
private ProcessBuilder getProcessBuilder() {
|
||||||
Map<String, String> env = new HashMap<>();
|
Map<String, String> env = new HashMap<>();
|
||||||
String[] processCommands = getArgs(env).toArray(new String[0]);
|
String[] processCommands = getArgs(env).toArray(new String[0]);
|
||||||
if (suiteContext.get().isAuthServerMigrationEnabled() && configuration.getImportFile() != null) {
|
|
||||||
for (int i = 0; i < processCommands.length; i++) {
|
|
||||||
if (processCommands[i].startsWith("--db-url=")) {
|
|
||||||
processCommands[i]= "--db-url=\"" + processCommands[i].substring(9) + "\"";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ProcessBuilder pb = new ProcessBuilder(processCommands);
|
ProcessBuilder pb = new ProcessBuilder(processCommands);
|
||||||
|
|
||||||
pb.environment().putAll(env);
|
pb.environment().putAll(env);
|
||||||
|
|
||||||
return pb;
|
return pb;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.List;
|
||||||
import static org.keycloak.testsuite.auth.page.AuthRealm.MASTER;
|
import static org.keycloak.testsuite.auth.page.AuthRealm.MASTER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for DB migration with legacy JPA store
|
* Test for DB migration with the JPA store
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:vramik@redhat.com">Vlastislav Ramik</a>
|
* @author <a href="mailto:vramik@redhat.com">Vlastislav Ramik</a>
|
||||||
*/
|
*/
|
||||||
|
@ -72,4 +72,16 @@ public class MigrationTest extends AbstractMigrationTest {
|
||||||
testMigrationTo24_x(true, true);
|
testMigrationTo24_x(true, true);
|
||||||
testMigrationTo25_0_0();
|
testMigrationTo25_0_0();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Migration(versionPrefix = "24.")
|
||||||
|
public void migration24_xTest() throws Exception{
|
||||||
|
testMigratedData(false);
|
||||||
|
|
||||||
|
// Always test offline-token login during migration test
|
||||||
|
testOfflineTokenLogin();
|
||||||
|
testExtremelyLongClientAttribute(migrationRealm);
|
||||||
|
|
||||||
|
testMigrationTo25_0_0();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue