geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r932863 - in /geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security: AbstractTest.java jaas/ConfigurationEntryTest.java jaas/TimeoutTest.java
Date Sun, 11 Apr 2010 10:32:07 GMT
Author: xuhaihong
Date: Sun Apr 11 10:32:07 2010
New Revision: 932863

URL: http://svn.apache.org/viewvc?rev=932863&view=rev
Log:
Fix the failed unit cases after using Karaf proxy LoginModule

Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java?rev=932863&r1=932862&r2=932863&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
Sun Apr 11 10:32:07 2010
@@ -45,7 +45,6 @@ import org.apache.geronimo.security.jaas
 import org.apache.geronimo.security.realm.providers.CertificateCallback;
 import org.apache.geronimo.security.realm.providers.CertificateChainCallback;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.testsupport.TestSupport;
 
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java?rev=932863&r1=932862&r2=932863&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
Sun Apr 11 10:32:07 2010
@@ -25,10 +25,10 @@ import java.util.Set;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
 
+import org.apache.felix.karaf.jaas.boot.ProxyLoginModule;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.osgi.MockBundleContext;
 import org.apache.geronimo.security.AbstractTest;
@@ -37,14 +37,13 @@ import org.apache.geronimo.security.Iden
 import org.apache.geronimo.security.RealmPrincipal;
 import org.apache.geronimo.security.realm.GenericSecurityRealm;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 
 /**
  * @version $Rev$ $Date$
  */
 public class ConfigurationEntryTest extends AbstractTest {
-    
+
 //    protected Kernel kernel;
     protected AbstractName serverInfo;
     protected AbstractName loginConfiguration;
@@ -55,13 +54,13 @@ public class ConfigurationEntryTest exte
 
     public void test() throws Exception {
         File auditlog = new File(BASEDIR, "target/login-audit.log");
-        
+
         if (auditlog.exists()) {
             auditlog.delete();
         }
-        
-        assertEquals("Audit file wasn't cleared", 0, auditlog.length());
 
+        assertEquals("Audit file wasn't cleared", 0, auditlog.length());
+        ProxyLoginModule.init(bundleContext);
         // First try with explicit configuration entry
         LoginContext context = ContextManager.login("properties-realm", new AbstractTest.UsernamePasswordCallback("alan",
"starcraft"));
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java?rev=932863&r1=932862&r2=932863&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java
Sun Apr 11 10:32:07 2010
@@ -25,6 +25,7 @@ import java.util.Set;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
 
+import org.apache.felix.karaf.jaas.boot.ProxyLoginModule;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.security.AbstractTest;
@@ -39,7 +40,7 @@ import org.apache.geronimo.security.real
  * @version $Rev$ $Date$
  */
 public class TimeoutTest extends AbstractTest {
-    
+
     protected AbstractName testCE;
     protected AbstractName testRealm;
     protected AbstractName clientLM;
@@ -54,7 +55,7 @@ public class TimeoutTest extends Abstrac
         GBeanData gbean;
 
         // Create all the parts
-
+        ProxyLoginModule.init(bundleContext);
         gbean = buildGBeanData    ("name", "PropertiesLoginModule", LoginModuleGBean.class);
         testCE = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");



Mime
View raw message