KEYCLOAK-8837 Adapt TS to be able to test migration from 7.2.5.GA (instead from 7.2.0.GA)
This commit is contained in:
parent
dc06a8cee3
commit
55f90ff09f
9 changed files with 21 additions and 22 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -60,3 +60,7 @@ target
|
|||
# KEYCLOAK-5391: We will re-exclude node_modules when node_modules handling is worked out.
|
||||
# For now, we keep our js libraries checked into GitHub, so we don't ignore.
|
||||
#node_modules
|
||||
|
||||
# testsuite #
|
||||
#############
|
||||
*offline-token.txt
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<assembly>
|
||||
|
||||
<id>auth-server-jboss-${migrated.auth.server.version}</id>
|
||||
<id>auth-server-migration-${migrated.auth.server.version}</id>
|
||||
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
|
@ -28,14 +28,14 @@
|
|||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${keycloak.server.home}</directory>
|
||||
<outputDirectory>keycloak-${migrated.auth.server.version}</outputDirectory>
|
||||
<outputDirectory>auth-server-migration</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>**/*.sh</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${keycloak.server.home}</directory>
|
||||
<outputDirectory>keycloak-${migrated.auth.server.version}</outputDirectory>
|
||||
<outputDirectory>auth-server-migration</outputDirectory>
|
||||
<includes>
|
||||
<include>**/*.sh</include>
|
||||
</includes>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<properties>
|
||||
<keycloak.server.home>${project.build.directory}/unpacked/keycloak-${migrated.auth.server.version}</keycloak.server.home>
|
||||
<jdbc.mvn.driver.deployment.dir>${keycloak.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
|
||||
<jdbc.mvn.driver.deployment.dir>${keycloak.server.home}/modules/system/layers/base/test/jdbc/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
<xsl:variable name="newDriverDefinition">
|
||||
<xsl:if test="$driver != 'h2'">
|
||||
<driver name="{$driver}" module="com.{$driver}"/>
|
||||
<driver name="{$driver}" module="test.jdbc.{$driver}"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<xsl:param name="version" select="''"/>
|
||||
|
||||
<xsl:variable name="newModuleDefinition">
|
||||
<module xmlns="urn:jboss:module:1.3" name="com.{$database}">
|
||||
<module xmlns="urn:jboss:module:1.3" name="test.jdbc.{$database}">
|
||||
<resources>
|
||||
<resource-root path="{$database}-{$version}.jar"/>
|
||||
</resources>
|
||||
|
|
|
@ -43,7 +43,7 @@ public class MigrationTestExecutionDecider implements TestExecutionDecider {
|
|||
|
||||
String versionFrom = migrationAnnotation.versionFrom();
|
||||
|
||||
if (migratedAuthServerVersion.contains(versionFrom)) {
|
||||
if (migratedAuthServerVersion.startsWith(versionFrom)) {
|
||||
return ExecutionDecision.execute();
|
||||
} else {
|
||||
return ExecutionDecision.dontExecute(method.getName() + "doesn't fit with migration version.");
|
||||
|
|
|
@ -68,23 +68,23 @@ public class MigrationTest extends AbstractMigrationTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Migration(versionFrom = "3.4.3.Final")
|
||||
public void migration3_4_3Test() {
|
||||
@Migration(versionFrom = "3.")
|
||||
public void migration3_xTest() {
|
||||
testMigratedData();
|
||||
testMigrationTo4_x();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Migration(versionFrom = "2.5.5.Final")
|
||||
public void migration2_5_5Test() {
|
||||
@Migration(versionFrom = "2.")
|
||||
public void migration2_xTest() {
|
||||
testMigratedData();
|
||||
testMigrationTo3_x();
|
||||
testMigrationTo4_x();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Migration(versionFrom = "1.9.8.Final")
|
||||
public void migration1_9_8Test() throws Exception {
|
||||
@Migration(versionFrom = "1.")
|
||||
public void migration1_xTest() throws Exception {
|
||||
testMigratedData(false);
|
||||
testMigrationTo2_x();
|
||||
testMigrationTo3_x();
|
||||
|
|
|
@ -122,7 +122,6 @@
|
|||
-Dauth.server.https.port=${auth.server.https.port}
|
||||
-Dkeycloak.password.blacklists.path=${keycloak.password.blacklists.path}
|
||||
${adapter.test.props}
|
||||
${migration.import.properties}
|
||||
${auth.server.profile}
|
||||
${auth.server.feature}
|
||||
${kie.maven.settings}
|
||||
|
|
|
@ -141,7 +141,6 @@
|
|||
-Djava.security.krb5.conf=${project.build.directory}/dependency/kerberos/test-krb5.conf
|
||||
</adapter.test.props>
|
||||
|
||||
<migration.import.properties/>
|
||||
<examples.home>${project.build.directory}/examples</examples.home>
|
||||
<examples.basedir>${keycloak-parent.basedir}/examples</examples.basedir> <!--keycloak/examples directory-->
|
||||
<examples.version.suffix>${project.version}</examples.version.suffix>
|
||||
|
@ -463,7 +462,6 @@
|
|||
<examples.home>${examples.home}</examples.home>
|
||||
<examples.version.suffix>${examples.version.suffix}</examples.version.suffix>
|
||||
|
||||
<migration.import.properties>${migration.import.properties}</migration.import.properties>
|
||||
<kie.maven.settings>${kie.maven.settings}</kie.maven.settings>
|
||||
|
||||
<testsuite.constants>${testsuite.constants}</testsuite.constants>
|
||||
|
@ -497,8 +495,6 @@
|
|||
<appium.fullReset>${appium.fullReset}</appium.fullReset>
|
||||
|
||||
<project.version>${project.version}</project.version>
|
||||
<migration.project.version>${migration.project.version}</migration.project.version>
|
||||
<migration.product.version>${migration.product.version}</migration.product.version>
|
||||
|
||||
<client.certificate.ca.path>${client.certificate.ca.path}</client.certificate.ca.path>
|
||||
<client.certificate.keystore>${client.certificate.keystore}</client.certificate.keystore>
|
||||
|
@ -1345,7 +1341,7 @@
|
|||
<systemPropertyVariables>
|
||||
<migrated.auth.server.version>${migrated.auth.server.version}</migrated.auth.server.version>
|
||||
<auth.server.jboss.migration>true</auth.server.jboss.migration>
|
||||
<keycloak.migration.home>${containers.home}/keycloak-${migrated.auth.server.version}</keycloak.migration.home>
|
||||
<keycloak.migration.home>${containers.home}/auth-server-migration</keycloak.migration.home>
|
||||
<migration.import.props.previous>${migration.import.props.previous}</migration.import.props.previous>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
|
@ -1356,14 +1352,14 @@
|
|||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>migration-productized</id>
|
||||
<id>migration-prod</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>migrated.version.import.file.suffix</name>
|
||||
<name>migration.import.file.name</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<migration.import.file>target/test-classes/migration-test/migration-realm-${migrated.version.import.file.suffix}.json</migration.import.file>
|
||||
<migration.import.file>target/test-classes/migration-test/${migration.import.file.name}</migration.import.file>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
|
|
Loading…
Reference in a new issue