KEYCLOAK-8522: Remove broker tests covered in new testsuite.

This commit is contained in:
Stan Silvert 2019-02-11 08:43:03 -05:00 committed by Pedro Igor
parent 05005a1791
commit b64f30c9d7
4 changed files with 0 additions and 96 deletions

View file

@ -97,46 +97,6 @@ public abstract class AbstractKeycloakIdentityProviderTest extends AbstractIdent
} }
} }
@Test
public void testTemporarilyDisabledUser() {
KeycloakSession session = brokerServerRule.startSession();
setUpdateProfileFirstLogin(session.realms().getRealmByName("realm-with-broker"), IdentityProviderRepresentation.UPFLM_OFF);
brokerServerRule.stopSession(session, true);
driver.navigate().to("http://localhost:8081/test-app");
loginPage.clickSocial(getProviderId());
loginPage.login("test-user", "password");
driver.navigate().to("http://localhost:8081/test-app/logout");
try {
session = brokerServerRule.startSession();
RealmModel brokerRealm = session.realms().getRealmByName("realm-with-broker");
brokerRealm.setBruteForceProtected(true);
brokerRealm.setFailureFactor(2);
brokerServerRule.stopSession(session, true);
driver.navigate().to("http://localhost:8081/test-app");
loginPage.login("test-user", "fail");
loginPage.login("test-user", "fail");
driver.navigate().to("http://localhost:8081/test-app");
assertTrue(driver.getCurrentUrl().startsWith("http://localhost:8081/auth/realms/realm-with-broker/protocol/openid-connect/auth"));
loginPage.clickSocial(getProviderId());
loginPage.login("test-user", "password");
assertTrue(errorPage.isCurrent());
assertEquals("Account is disabled, contact admin.", errorPage.getError());
} finally {
session = brokerServerRule.startSession();
RealmModel brokerRealm = session.realms().getRealmByName("realm-with-broker");
brokerRealm.setBruteForceProtected(false);
brokerRealm.setFailureFactor(0);
brokerServerRule.stopSession(session, true);
}
}
@Test @Test
public void testSuccessfulAuthenticationUpdateProfileOnMissing_nothingMissing() { public void testSuccessfulAuthenticationUpdateProfileOnMissing_nothingMissing() {
IdentityProviderModel identityProviderModel = getIdentityProviderModel(); IdentityProviderModel identityProviderModel = getIdentityProviderModel();
@ -392,14 +352,6 @@ public abstract class AbstractKeycloakIdentityProviderTest extends AbstractIdent
} }
} }
@Test
public void testProviderOnLoginPage() {
// Provider button is available on login page
this.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"));
loginPage.findSocialButton(getProviderId());
}
@Test @Test
public void testAccountManagementLinkIdentity() { public void testAccountManagementLinkIdentity() {
// Login as pedroigor to account management // Login as pedroigor to account management
@ -484,16 +436,6 @@ public abstract class AbstractKeycloakIdentityProviderTest extends AbstractIdent
assertEquals("Federated identity returned by " + getProviderId() + " is already linked to another user.", accountFederatedIdentityPage.getError()); assertEquals("Federated identity returned by " + getProviderId() + " is already linked to another user.", accountFederatedIdentityPage.getError());
} }
@Test(expected = NoSuchElementException.class)
public void testIdentityProviderNotAllowed() {
this.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"));
driver.findElement(By.className("model-oidc-idp"));
}
protected void configureClientRetrieveToken(String clientId) { protected void configureClientRetrieveToken(String clientId) {
RealmModel realm = getRealm(); RealmModel realm = getRealm();
RoleModel readTokenRole = realm.getClientByClientId(Constants.BROKER_SERVICE_CLIENT_ID).getRole(Constants.READ_TOKEN_ROLE); RoleModel readTokenRole = realm.getClientByClientId(Constants.BROKER_SERVICE_CLIENT_ID).getRole(Constants.READ_TOKEN_ROLE);

View file

@ -182,13 +182,6 @@ public class OIDCBrokerUserPropertyTest extends AbstractKeycloakIdentityProvider
// ignore // ignore
} }
@Override
@Test
@Ignore
public void testProviderOnLoginPage() {
// ignore
}
@Override @Override
@Test @Test
@Ignore @Ignore
@ -203,13 +196,6 @@ public class OIDCBrokerUserPropertyTest extends AbstractKeycloakIdentityProvider
// ignore // ignore
} }
@Override
@Test
@Ignore
public void testIdentityProviderNotAllowed() {
// ignore
}
@Override @Override
@Test @Test
@Ignore @Ignore

View file

@ -110,21 +110,11 @@ public class OIDCKeyCloakServerBrokerBasicTest extends AbstractKeycloakIdentityP
return "kc-oidc-idp"; return "kc-oidc-idp";
} }
@Test
public void testSuccessfulAuthentication() {
super.testSuccessfulAuthentication();
}
@Test @Test
public void testDisabledUser() throws Exception { public void testDisabledUser() throws Exception {
super.testDisabledUser(); super.testDisabledUser();
} }
@Test
public void testTemporarilyDisabledUser() {
super.testTemporarilyDisabledUser();
}
@Test @Test
public void testLogoutWorksWithTokenTimeout() { public void testLogoutWorksWithTokenTimeout() {
try (Keycloak keycloak = Keycloak.getInstance("http://localhost:8081/auth", "master", "admin", "admin", org.keycloak.models.Constants.ADMIN_CLI_CLIENT_ID)) { try (Keycloak keycloak = Keycloak.getInstance("http://localhost:8081/auth", "master", "admin", "admin", org.keycloak.models.Constants.ADMIN_CLI_CLIENT_ID)) {

View file

@ -171,13 +171,6 @@ public class SAMLBrokerUserPropertyTest extends AbstractKeycloakIdentityProvider
// ignore // ignore
} }
@Override
@Test
@Ignore
public void testProviderOnLoginPage() {
// ignore
}
@Override @Override
@Test @Test
@Ignore @Ignore
@ -192,13 +185,6 @@ public class SAMLBrokerUserPropertyTest extends AbstractKeycloakIdentityProvider
// ignore // ignore
} }
@Override
@Test
@Ignore
public void testIdentityProviderNotAllowed() {
// ignore
}
@Override @Override
@Test @Test
@Ignore @Ignore