Testsuite with Undertow and OpenJDK17 - Nashorn library support.
GH Actions failures - refactoring.
This commit is contained in:
parent
406aa21b0b
commit
d9b95e0240
9 changed files with 19 additions and 8 deletions
|
@ -196,7 +196,6 @@ public abstract class AbstractKeycloakTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
oauth.init(driver);
|
oauth.init(driver);
|
||||||
createAppClientInRealm("test");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reconnectAdminClient() throws Exception {
|
public void reconnectAdminClient() throws Exception {
|
||||||
|
|
|
@ -40,6 +40,7 @@ public abstract class AbstractCustomAccountManagementTest extends AbstractAccoun
|
||||||
@Before
|
@Before
|
||||||
public void beforeTest() {
|
public void beforeTest() {
|
||||||
authMgmtResource = testRealmResource().flows();
|
authMgmtResource = testRealmResource().flows();
|
||||||
|
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AuthenticationManagementResource getAuthMgmtResource() {
|
protected AuthenticationManagementResource getAuthMgmtResource() {
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
package org.keycloak.testsuite.account.custom;
|
package org.keycloak.testsuite.account.custom;
|
||||||
|
|
||||||
import org.jboss.arquillian.graphene.page.Page;
|
import org.jboss.arquillian.graphene.page.Page;
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.keycloak.models.AuthenticationExecutionModel.Requirement;
|
import org.keycloak.models.AuthenticationExecutionModel.Requirement;
|
||||||
import org.keycloak.models.utils.DefaultAuthenticationFlows;
|
import org.keycloak.models.utils.DefaultAuthenticationFlows;
|
||||||
|
@ -87,12 +86,6 @@ public class CustomAuthFlowOTPTest extends AbstractCustomAccountManagementTest {
|
||||||
testLoginOneTimeCodePage.setAuthRealm(testRealmPage);
|
testLoginOneTimeCodePage.setAuthRealm(testRealmPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
|
||||||
@Override
|
|
||||||
public void beforeTest() {
|
|
||||||
super.beforeTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void configureRequiredActions() {
|
private void configureRequiredActions() {
|
||||||
//set configure TOTP as required action to test user
|
//set configure TOTP as required action to test user
|
||||||
List<String> requiredActions = new ArrayList<>();
|
List<String> requiredActions = new ArrayList<>();
|
||||||
|
|
|
@ -309,6 +309,7 @@ public class DemoServletsAdapterTest extends AbstractServletsAdapterTest {
|
||||||
|
|
||||||
// set demo realm name for all tests
|
// set demo realm name for all tests
|
||||||
oauth.realm(testRealmResource().toRepresentation().getRealm());
|
oauth.realm(testRealmResource().toRepresentation().getRealm());
|
||||||
|
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
|
@ -50,6 +50,8 @@ public class SessionTest extends AbstractClientTest {
|
||||||
|
|
||||||
assertAdminEvents.assertEvent(getRealmId(), OperationType.CREATE, AdminEventPaths.userResourcePath(testUser.getId()), ResourceType.USER);
|
assertAdminEvents.assertEvent(getRealmId(), OperationType.CREATE, AdminEventPaths.userResourcePath(testUser.getId()), ResourceType.USER);
|
||||||
assertAdminEvents.assertEvent(getRealmId(), OperationType.ACTION, AdminEventPaths.userResetPasswordPath(testUser.getId()), ResourceType.USER);
|
assertAdminEvents.assertEvent(getRealmId(), OperationType.ACTION, AdminEventPaths.userResetPasswordPath(testUser.getId()), ResourceType.USER);
|
||||||
|
|
||||||
|
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -175,6 +175,7 @@ public class SocialLoginTest extends AbstractKeycloakTest {
|
||||||
@Before
|
@Before
|
||||||
public void beforeSocialLoginTest() {
|
public void beforeSocialLoginTest() {
|
||||||
oauth.realm(REALM);
|
oauth.realm(REALM);
|
||||||
|
createAppClientInRealm(REALM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.apache.http.protocol.BasicHttpContext;
|
||||||
import org.apache.http.protocol.HttpContext;
|
import org.apache.http.protocol.HttpContext;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.jboss.arquillian.graphene.page.Page;
|
import org.jboss.arquillian.graphene.page.Page;
|
||||||
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.keycloak.models.Constants;
|
import org.keycloak.models.Constants;
|
||||||
import org.keycloak.representations.idm.RealmRepresentation;
|
import org.keycloak.representations.idm.RealmRepresentation;
|
||||||
|
@ -76,6 +77,11 @@ public class CookieTest extends AbstractKeycloakTest {
|
||||||
@Page
|
@Page
|
||||||
protected AppPage appPage;
|
protected AppPage appPage;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void beforeCookieTest() {
|
||||||
|
createAppClientInRealm("test");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addTestRealms(List<RealmRepresentation> testRealms) {
|
public void addTestRealms(List<RealmRepresentation> testRealms) {
|
||||||
RealmRepresentation realmRepresentation = loadJson(getClass().getResourceAsStream("/testrealm.json"), RealmRepresentation.class);
|
RealmRepresentation realmRepresentation = loadJson(getClass().getResourceAsStream("/testrealm.json"), RealmRepresentation.class);
|
||||||
|
|
|
@ -159,6 +159,7 @@ public class UserStorageTest extends AbstractAuthTest {
|
||||||
|
|
||||||
propProviderRWId = addComponent(newPropProviderRW());
|
propProviderRWId = addComponent(newPropProviderRW());
|
||||||
|
|
||||||
|
createAppClientInRealm(testRealmResource().toRepresentation().getRealm());
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
|
@ -1844,6 +1844,13 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</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 -->
|
<!-- CLI -->
|
||||||
<!--
|
<!--
|
||||||
- This dependency must come after org.bouncycastle dependencies since it contains BC classes,
|
- This dependency must come after org.bouncycastle dependencies since it contains BC classes,
|
||||||
|
|
Loading…
Reference in a new issue