From 5790dd44a4db69e1a05892b263f911038fce66a4 Mon Sep 17 00:00:00 2001 From: mhajas Date: Mon, 29 Feb 2016 17:23:27 +0100 Subject: [PATCH] Make adapter tests run also on EAP6 and EAP7 --- .../AbstractSAMLServletsAdapterTest.java | 6 +-- .../tests/other/adapters/eap6/pom.xml | 26 ++++++++++ .../src/main/xslt/add-adapter-log-level.xsl | 50 +++++++++++++++++++ .../tests/other/adapters/eap7/pom.xml | 26 ++++++++++ .../src/main/xslt/add-adapter-log-level.xsl | 50 +++++++++++++++++++ 5 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/add-adapter-log-level.xsl create mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/add-adapter-log-level.xsl diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java index 2bdabc9870..62ac22681d 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractSAMLServletsAdapterTest.java @@ -224,7 +224,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); salesPostPassiveServletPage.navigateTo(); - assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("")); + assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("") || driver.getPageSource().contains("
"));
 
         salesPostSigEmailServletPage.navigateTo();
         assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage);
@@ -371,7 +371,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
     public void salesPostPassiveTest() {
         salesPostPassiveServletPage.navigateTo();
         //Different 403 status page on EAP and Wildfly
-        assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains(""));
+        assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("") || driver.getPageSource().contains("
"));
 
         salesPostServletPage.navigateTo();
         testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
@@ -382,7 +382,7 @@ public abstract class AbstractSAMLServletsAdapterTest extends AbstractServletsAd
         salesPostPassiveServletPage.logout();
         salesPostPassiveServletPage.navigateTo();
         //Different 403 status page on EAP and Wildfly
-        assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains(""));
+        assertTrue(driver.getPageSource().contains("Forbidden") || driver.getPageSource().contains("") || driver.getPageSource().contains("
"));
 
         salesPostServletPage.navigateTo();
         testRealmSAMLRedirectLoginPage.form().login("unauthorized", "password");
diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml
index 6a11a450ee..2cd96db8a8 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml
@@ -92,6 +92,32 @@
                     
                 
             
+            
+                org.codehaus.mojo
+                xml-maven-plugin
+                
+                    
+                        configure-adapter-debug-log
+                        process-resources
+                        
+                            transform
+                        
+                        
+                            
+                                
+                                    ${app.server.eap6.home}/standalone/configuration
+                                    
+                                        standalone.xml
+                                    
+                                    src/main/xslt/add-adapter-log-level.xsl
+                                    ${app.server.eap6.home}/standalone/configuration
+                                
+                            
+                        
+                    
+                
+            
+
         
     
     
diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/add-adapter-log-level.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/add-adapter-log-level.xsl
new file mode 100644
index 0000000000..39cec8b0a6
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/add-adapter-log-level.xsl
@@ -0,0 +1,50 @@
+
+
+
+
+    
+
+    
+    
+
+    
+
+    
+        
+            
+        
+        
+            
+        
+    
+
+    
+        
+            
+        
+    
+
+
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml
index 187a7c107c..7218dad93c 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml
@@ -129,6 +129,32 @@
                             
                         
                     
+
+                    
+                        org.codehaus.mojo
+                        xml-maven-plugin
+                        
+                            
+                                configure-adapter-debug-log
+                                process-resources
+                                
+                                    transform
+                                
+                                
+                                    
+                                        
+                                            ${app.server.eap7.home}/standalone/configuration
+                                            
+                                                standalone.xml
+                                            
+                                            src/main/xslt/add-adapter-log-level.xsl
+                                            ${app.server.eap7.home}/standalone/configuration
+                                        
+                                    
+                                
+                            
+                        
+                    
                 
             
         
diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/add-adapter-log-level.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/add-adapter-log-level.xsl
new file mode 100644
index 0000000000..39cec8b0a6
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/add-adapter-log-level.xsl
@@ -0,0 +1,50 @@
+
+
+
+
+    
+
+    
+    
+
+    
+
+    
+        
+            
+        
+        
+            
+        
+    
+
+    
+        
+            
+        
+    
+
+
\ No newline at end of file