KEYCLOAK-9112 KEYCLOAK-9108 Ignore expected exceptions

This commit is contained in:
Hynek Mlnarik 2019-01-15 14:21:55 +01:00 committed by Hynek Mlnařík
parent 52840533c9
commit c34c0a3860
4 changed files with 16 additions and 2 deletions

View file

@ -50,6 +50,7 @@ import org.keycloak.representations.idm.authorization.ResourceServerRepresentati
import org.keycloak.testsuite.adapter.page.PhotozClientAuthzTestApp;
import org.keycloak.testsuite.admin.ApiUtil;
import org.keycloak.testsuite.arquillian.AppServerTestEnricher;
import org.keycloak.testsuite.arquillian.annotation.UncaughtServerErrorExpected;
import org.keycloak.testsuite.auth.page.login.OAuthGrant;
import org.keycloak.testsuite.util.DroneUtils;
import org.keycloak.testsuite.util.JavascriptBrowser;
@ -214,6 +215,7 @@ public abstract class AbstractPhotozExampleAdapterTest extends AbstractPhotozJav
}
@Test
@UncaughtServerErrorExpected
public void createAlbumWithInvalidUser() throws Exception {
loginToClientPage(aliceUser);

View file

@ -41,6 +41,7 @@ import org.keycloak.representations.idm.authorization.DecisionStrategy;
import org.keycloak.representations.idm.authorization.Logic;
import org.keycloak.representations.idm.authorization.PolicyRepresentation;
import org.keycloak.representations.idm.authorization.UserPolicyRepresentation;
import org.keycloak.testsuite.arquillian.annotation.UncaughtServerErrorExpected;
import org.keycloak.testsuite.util.RealmBuilder;
import org.keycloak.testsuite.util.UserBuilder;
@ -200,6 +201,7 @@ public class UserPolicyManagementTest extends AbstractPolicyManagementTest {
}
@Test
@UncaughtServerErrorExpected
public void failInvalidUser() {
AuthorizationResource authorization = getClient().authorization();

View file

@ -36,6 +36,7 @@ import org.keycloak.representations.idm.ComponentRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.storage.UserStorageProvider;
import org.keycloak.testsuite.ActionURIUtils;
import org.keycloak.testsuite.arquillian.annotation.UncaughtServerErrorExpected;
import org.keycloak.testsuite.util.KerberosRule;
import org.keycloak.util.ldap.KerberosEmbeddedServer;
@ -156,6 +157,7 @@ public class KerberosStandaloneTest extends AbstractKerberosSingleRealmTest {
* @throws Exception
*/
@Test
@UncaughtServerErrorExpected
public void handleUnknownKerberosRealm() throws Exception {
// Switch kerberos realm to "unavailable"
List<ComponentRepresentation> reps = testRealmResource().components().query("test", UserStorageProvider.class.getName());

View file

@ -41,6 +41,7 @@ import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.testsuite.AbstractTestRealmKeycloakTest;
import org.keycloak.testsuite.AssertEvents;
import org.keycloak.testsuite.arquillian.annotation.UncaughtServerErrorExpected;
import org.keycloak.testsuite.authentication.PushButtonAuthenticatorFactory;
import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.ErrorPage;
@ -556,9 +557,16 @@ public class FlowOverrideTest extends AbstractTestRealmKeycloakTest {
clientRep.getAuthenticationFlowBindingOverrides().put(AuthenticationFlowBindings.BROWSER_BINDING, browserFlowId);
clients.get(clientRep.getId()).update(clientRep);
testWithClientBrowserOverride();
}
@Test
@UncaughtServerErrorExpected
public void testRestInterfaceWithBadId() throws Exception {
ClientsResource clients = adminClient.realm("test").clients();
List<ClientRepresentation> query = clients.findByClientId(TEST_APP_FLOW);
ClientRepresentation clientRep = query.get(0);
String browserFlowId = clientRep.getAuthenticationFlowBindingOverrides().get(AuthenticationFlowBindings.BROWSER_BINDING);
query = clients.findByClientId(TEST_APP_FLOW);
clientRep = query.get(0);
clientRep.getAuthenticationFlowBindingOverrides().put(AuthenticationFlowBindings.BROWSER_BINDING, "bad-id");
try {
clients.get(clientRep.getId()).update(clientRep);