Testsuite with Undertow and OpenJDK17 - Nashorn library support.

GH Actions failures - refactoring.
This commit is contained in:
Lukas Hanusovsky 2023-05-10 09:43:07 +02:00 committed by Michal Hajas
parent 406aa21b0b
commit d9b95e0240
9 changed files with 19 additions and 8 deletions

View file

@ -196,7 +196,6 @@ public abstract class AbstractKeycloakTest {
}
oauth.init(driver);
createAppClientInRealm("test");
}
public void reconnectAdminClient() throws Exception {

View file

@ -40,6 +40,7 @@ public abstract class AbstractCustomAccountManagementTest extends AbstractAccoun
@Before
public void beforeTest() {
authMgmtResource = testRealmResource().flows();
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
}
protected AuthenticationManagementResource getAuthMgmtResource() {

View file

@ -17,7 +17,6 @@
package org.keycloak.testsuite.account.custom;
import org.jboss.arquillian.graphene.page.Page;
import org.junit.Before;
import org.junit.Test;
import org.keycloak.models.AuthenticationExecutionModel.Requirement;
import org.keycloak.models.utils.DefaultAuthenticationFlows;
@ -86,12 +85,6 @@ public class CustomAuthFlowOTPTest extends AbstractCustomAccountManagementTest {
super.setDefaultPageUriParameters();
testLoginOneTimeCodePage.setAuthRealm(testRealmPage);
}
@Before
@Override
public void beforeTest() {
super.beforeTest();
}
private void configureRequiredActions() {
//set configure TOTP as required action to test user

View file

@ -309,6 +309,7 @@ public class DemoServletsAdapterTest extends AbstractServletsAdapterTest {
// set demo realm name for all tests
oauth.realm(testRealmResource().toRepresentation().getRealm());
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
}
@After

View file

@ -50,6 +50,8 @@ public class SessionTest extends AbstractClientTest {
assertAdminEvents.assertEvent(getRealmId(), OperationType.CREATE, AdminEventPaths.userResourcePath(testUser.getId()), ResourceType.USER);
assertAdminEvents.assertEvent(getRealmId(), OperationType.ACTION, AdminEventPaths.userResetPasswordPath(testUser.getId()), ResourceType.USER);
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
}
@Override

View file

@ -175,6 +175,7 @@ public class SocialLoginTest extends AbstractKeycloakTest {
@Before
public void beforeSocialLoginTest() {
oauth.realm(REALM);
createAppClientInRealm(REALM);
}
@After

View file

@ -29,6 +29,7 @@ import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
import org.jboss.arquillian.graphene.page.Page;
import org.junit.Before;
import org.junit.Test;
import org.keycloak.models.Constants;
import org.keycloak.representations.idm.RealmRepresentation;
@ -76,6 +77,11 @@ public class CookieTest extends AbstractKeycloakTest {
@Page
protected AppPage appPage;
@Before
public void beforeCookieTest() {
createAppClientInRealm("test");
}
@Override
public void addTestRealms(List<RealmRepresentation> testRealms) {
RealmRepresentation realmRepresentation = loadJson(getClass().getResourceAsStream("/testrealm.json"), RealmRepresentation.class);

View file

@ -159,6 +159,7 @@ public class UserStorageTest extends AbstractAuthTest {
propProviderRWId = addComponent(newPropProviderRW());
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
}
@After

View file

@ -1844,6 +1844,13 @@
<scope>compile</scope>
</dependency>
<!-- OpenJDK 17 and further versions doesn't provide Nashorn library out of the box. -->
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>${nashorn.version}</version>
</dependency>
<!-- CLI -->
<!--
- This dependency must come after org.bouncycastle dependencies since it contains BC classes,