Fix failing test
This commit is contained in:
parent
a258dd51ee
commit
286de3e905
1 changed files with 74 additions and 63 deletions
|
@ -464,8 +464,8 @@ public abstract class AbstractKeycloakIdentityProviderTest extends AbstractIdent
|
||||||
setUpdateProfileFirstLogin(IdentityProviderRepresentation.UPFLM_ON);
|
setUpdateProfileFirstLogin(IdentityProviderRepresentation.UPFLM_ON);
|
||||||
IdentityProviderModel identityProviderModel = getIdentityProviderModel();
|
IdentityProviderModel identityProviderModel = getIdentityProviderModel();
|
||||||
|
|
||||||
identityProviderModel.setStoreToken(true);
|
setStoreToken(identityProviderModel, true);
|
||||||
|
try {
|
||||||
authenticateWithIdentityProvider(identityProviderModel, "test-user", true);
|
authenticateWithIdentityProvider(identityProviderModel, "test-user", true);
|
||||||
|
|
||||||
brokerServerRule.stopSession(session, true);
|
brokerServerRule.stopSession(session, true);
|
||||||
|
@ -530,6 +530,17 @@ public abstract class AbstractKeycloakIdentityProviderTest extends AbstractIdent
|
||||||
driver.navigate().to("http://localhost:8081/test-app");
|
driver.navigate().to("http://localhost:8081/test-app");
|
||||||
|
|
||||||
assertTrue(this.driver.getCurrentUrl().startsWith("http://localhost:8081/auth/realms/realm-with-broker/protocol/openid-connect/auth"));
|
assertTrue(this.driver.getCurrentUrl().startsWith("http://localhost:8081/auth/realms/realm-with-broker/protocol/openid-connect/auth"));
|
||||||
|
} finally {
|
||||||
|
setStoreToken(identityProviderModel, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setStoreToken(IdentityProviderModel identityProviderModel, boolean storeToken) {
|
||||||
|
identityProviderModel.setStoreToken(storeToken);
|
||||||
|
getRealm().updateIdentityProvider(identityProviderModel);
|
||||||
|
|
||||||
|
brokerServerRule.stopSession(session, storeToken);
|
||||||
|
session = brokerServerRule.startSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void doAssertTokenRetrieval(String pageSource);
|
protected abstract void doAssertTokenRetrieval(String pageSource);
|
||||||
|
|
Loading…
Reference in a new issue