keycloak-scim/testsuite/integration-arquillian/tests/other/server-config-migration
Hynek Mlnarik 37ef47d6ab KEYCLOAK-9509 Upgrade to Wildfly 15
KEYCLOAK-9584 Update Wildfly Arquillian version

KEYCLOAK-9581: Fix CookiePathTests

KEYCLOAK-9607 CLI sripts and configuration files update

KEYCLOAK-9580 Fix component registration error

KEYCLOAK-9590 Update JDG to newest version

* Infinispan is using whatever version is set in root pom.xml.

KEYCLOAK-9509 Fix Undertow tests

Co-Authored-By: vramik <vramik@redhat.com>
Co-Authored-By: sebastienblanc <scm.blanc@gmail.com>
2019-02-25 08:56:46 +01:00
..
src KEYCLOAK-7594 Upgrade to Wildfly 13. Cross-DC: Upgrade to infinispan server 9.2.4 and JDG 7.2 2018-08-27 12:52:53 +02:00
pom.xml KEYCLOAK-9509 Upgrade to Wildfly 15 2019-02-25 08:56:46 +01:00
README.md KEYCLOAK-7594 Upgrade to Wildfly 13. Cross-DC: Upgrade to infinispan server 9.2.4 and JDG 7.2 2018-08-27 12:52:53 +02:00

Keycloak Server Config Migration Testsuite

Test workflow

There are performed several steps before actual test is executed. The steps are divided into different maven lifecycle phases to make sure it goes in specified wanted order.

process-resources

Unpack clean keycloak-server-dist

compile

Copy standalone/domain resources to ${jbossHome}/standalone/configuration and ${jbossHome}/domain/configuration

process-classes

maven-exec-plugin is used to read current master configs and saves the output to ${project.build.directory}/master-${config.name}.txt

generate-test-sources

Files ${jbossHome}/standalone/configuration/keycloak-server.json and ${jbossHome}/domain/configuration/keycloak-server.json are created.

Configuration files (standalone.xml, standalone-ha.xml, domain.xml, host-master.xml) are overwritten by those from previous version.

process-test-sources

Migration scripts are applied using offline mode. Temporary data are removed.

generate-test-resources

wildfly-maven-plugin is used to start and shutdown container with different configs. It is done to let subsystems to upgrade themselves during first run.

process-test-resources

maven-exec-plugin is used to read migrated configs and saves the output to ${project.build.directory}/migrated-${config.name}.txt

default-test

org.keycloak.test.config.migration.ConfigMigrationTest is executed. It compares generated outputs from ${project.build.directory}

If config outputs don't equal to each other, by default the test will compare outputs more deeply to get more readable output. It fails on first found difference.

This can be overwritten by adding property: -Dget.simple.full.comparison=true to the test command. In that case it'll perform assert on the two config outputs.

Properties

maven

  • jbossHome
    • default: ${project.build.directory}/keycloak-${project.version}
    • specifies path to jbossHome dir
  • migrated.version
    • default: 1.8.1
    • specifies version it is migrated from
  • master.version
    • default: ${project.version}
    • specifies version it is migrated to

How to run tests

note: keycloak-server-dist module has to be build first (mvn install -f keycloak/pom.xml -Pdistribution)

  • mvn clean install tests migration from 1.8.1.Final to current master. It goes thru whole test workflow. Deep comparison is done.
  • mvn clean install -Dget.simple.full.comparison=true does assert on outputs instead of deep comparison.
  • mvn clean process-test-sources -Dskip.rename.configs=true applies migration scripts to current master. It can be used to make sure the current keycloak version doesn't break the scripts.
  • mvn clean install -Dskip.rename.configs=true applies scripts to current master and verifies the scripts doesn't actually change anything.