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: |
SEP=""
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"
SEP=","
done
@ -923,6 +923,21 @@ jobs:
with:
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:
name: Test PoC
runs-on: ubuntu-latest
@ -941,7 +956,7 @@ jobs:
- name: Run tests
env:
KC_TEST_BROWSER: chrome-headless
run: mvn clean install -f test-poc
run: ./mvnw clean install -f test-poc/pom.xml
check:
name: Status Check - Keycloak CI

View file

@ -301,6 +301,7 @@
<module>authz</module>
<module>misc</module>
<module>js</module>
<module>test-framework</module>
<module>quarkus</module>
</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"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-test-parent</artifactId>
<groupId>org.keycloak.test</groupId>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>999.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-test-junit5-framework</artifactId>
<name>Keycloak JUnit 5 testing framework</name>
<artifactId>keycloak-test-framework</artifactId>
<name>Keycloak Test Framework</name>
<packaging>jar</packaging>
<description>PoC JUnit 5 testing framework for Keycloak</description>
<description>Preview Keycloak testing framework based on JUnit 5</description>
<properties>
<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 jakarta.ws.rs.core.Response;
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.ManagedClient;
import org.keycloak.test.framework.realm.ManagedRealm;
import org.keycloak.test.framework.util.ApiUtil;
import java.io.IOException;
import java.net.URI;

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