keycloak / keycloak

Open Source Identity and Access Management For Modern Applications and Services
https://www.keycloak.org
Apache License 2.0
22.12k stars 6.6k forks source link

Add MigrationTest action into GH Workflow #20680

Open lhanusov opened 1 year ago

lhanusov commented 1 year ago

Description

Example PR: https://github.com/keycloak/keycloak/pull/20654 (author: @miquelsi) Bug which blocked the PR: https://github.com/keycloak/keycloak/issues/20455

Because of the Keycloak 22 and RHBK 22 release, this action is postponed after the RHBK release in September.

Instead of trying to support multiple JDKs in Testsuite, it's better to download the Keycloak container image and run it within Arquillian instead of unziping and running the standalone distribution with different JDK version.

lhanusov commented 1 year ago

Using testcontainers: https://github.com/testcontainers/testcontainers-java with Arquillian or Quarkus can replace the ZIP startup with docker run lifecycle within Integration test suite like over here: https://github.com/keycloak/keycloak/blob/main/quarkus/tests/junit5/src/main/java/org/keycloak/it/junit5/extension/DatabaseContainer.java

lhanusov commented 1 year ago

Integrate with (Postgres, MariaDB, MySQL): https://github.com/keycloak/keycloak/blob/main/testsuite/integration-arquillian/tests/base/pom.xml#L368-L436 or replace with TestContainers

lhanusov commented 1 year ago

Startup: https://github.com/keycloak/keycloak/blob/main/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java#L296-L310

Registry: https://github.com/keycloak/keycloak/blob/main/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/RegistryCreator.java#L70-L95

Definition: https://github.com/keycloak/keycloak/blob/main/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml#L719-L736