Move Test Framework (#32407)

* Move Test Framework

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>

* Update .github/workflows/ci.yml

Signed-off-by: Stian Thorgersen <stian@redhat.com>

---------

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
Signed-off-by: Stian Thorgersen <stian@redhat.com>
Co-authored-by: Stian Thorgersen <stian@redhat.com>
This commit is contained in:
Lukas Hanusovsky 2024-08-28 14:14:08 +02:00 committed by GitHub
parent cd947ce3bc
commit 2b2107f397
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 33 additions and 18 deletions

View file

@ -80,7 +80,7 @@ jobs:
run: | run: |
SEP="" SEP=""
PROJECTS="" PROJECTS=""
for i in `find -name '*Test.java' -type f | egrep -v './(testsuite|quarkus|docs|test-poc)/' | sed 's|/src/test/java/.*||' | sort | uniq | sed 's|./||'`; do for i in `find -name '*Test.java' -type f | egrep -v './(testsuite|quarkus|docs|test-poc|test-framework)/' | sed 's|/src/test/java/.*||' | sort | uniq | sed 's|./||'`; do
PROJECTS="$PROJECTS$SEP$i" PROJECTS="$PROJECTS$SEP$i"
SEP="," SEP=","
done done
@ -923,6 +923,21 @@ jobs:
with: with:
job-id: migration-tests-${{ matrix.old-version }}-${{ matrix.database }} job-id: migration-tests-${{ matrix.old-version }}-${{ matrix.database }}
test-framework:
name: Keycloak Test Framework
runs-on: ubuntu-latest
needs: build
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- id: integration-test-setup
name: Integration test setup
uses: ./.github/actions/integration-test-setup
- name: Run tests
run: ./mvnw test -f test-framework/pom.xml
test-poc: test-poc:
name: Test PoC name: Test PoC
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -941,7 +956,7 @@ jobs:
- name: Run tests - name: Run tests
env: env:
KC_TEST_BROWSER: chrome-headless KC_TEST_BROWSER: chrome-headless
run: mvn clean install -f test-poc run: ./mvnw clean install -f test-poc/pom.xml
check: check:
name: Status Check - Keycloak CI name: Status Check - Keycloak CI

View file

@ -301,6 +301,7 @@
<module>authz</module> <module>authz</module>
<module>misc</module> <module>misc</module>
<module>js</module> <module>js</module>
<module>test-framework</module>
<module>quarkus</module> <module>quarkus</module>
</modules> </modules>

View file

@ -19,17 +19,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<artifactId>keycloak-test-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak.test</groupId> <groupId>org.keycloak</groupId>
<version>999.0.0-SNAPSHOT</version> <version>999.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-test-junit5-framework</artifactId> <artifactId>keycloak-test-framework</artifactId>
<name>Keycloak JUnit 5 testing framework</name> <name>Keycloak Test Framework</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<description>PoC JUnit 5 testing framework for Keycloak</description> <description>Preview Keycloak testing framework based on JUnit 5</description>
<properties> <properties>
<selenium.version>4.23.1</selenium.version> <selenium.version>4.23.1</selenium.version>

View file

@ -23,10 +23,10 @@ import com.nimbusds.oauth2.sdk.token.AccessToken;
import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.ClientRepresentation;
import org.keycloak.test.framework.util.ApiUtil;
import org.keycloak.test.framework.realm.ClientConfig; import org.keycloak.test.framework.realm.ClientConfig;
import org.keycloak.test.framework.realm.ManagedClient; import org.keycloak.test.framework.realm.ManagedClient;
import org.keycloak.test.framework.realm.ManagedRealm; import org.keycloak.test.framework.realm.ManagedRealm;
import org.keycloak.test.framework.util.ApiUtil;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;

Some files were not shown because too many files have changed in this diff Show more