Skip to content

Commit

Permalink
KEYCLOAK-4751 Fix tests on EAP6 and add test for EAP7
Browse files Browse the repository at this point in the history
  • Loading branch information
mhajas committed Jan 26, 2018
1 parent 502627f commit 8ac7d1d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ public void testCanAccessWhenPermissive() throws Exception {
performTests(() -> {
login("jdoe", "jdoe");
driver.navigate().to(getResourceServerUrl() + "/enforcing/resource");
assertTrue(driver.getTitle().equals("Error"));
assertTrue(driver.getPageSource().contains("Not Found"));

if (System.getProperty("app.server","").startsWith("eap6")) {
assertTrue(driver.getPageSource().contains("HTTP Status 404"));
} else {
assertTrue(driver.getTitle().equals("Error"));
assertTrue(driver.getPageSource().contains("Not Found"));
}

driver.navigate().to(getResourceServerUrl() + "/protected/admin");
assertTrue(wasDenied());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter.example.authorization;

import org.jboss.arquillian.container.test.api.RunAsClient;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;

/**
*
* @author tkyjovsk
*/
@RunAsClient
@AppServerContainer("app-server-eap")
public class EAPPermissiveModeAdapterTest extends AbstractPermissiveModeAdapterTest {

}

0 comments on commit 8ac7d1d

Please sign in to comment.