geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r563749 - /geronimo/server/branches/2.0/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
Date Wed, 08 Aug 2007 05:18:14 GMT
Author: djencks
Date: Tue Aug  7 22:18:14 2007
New Revision: 563749

URL: http://svn.apache.org/viewvc?view=rev&rev=563749
Log:
GERONIMO-3388 Likely fix of LoginKerberosTest in case kerberos is actually installed

Modified:
    geronimo/server/branches/2.0/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java

Modified: geronimo/server/branches/2.0/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java?view=diff&rev=563749&r1=563748&r2=563749
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
Tue Aug  7 22:18:14 2007
@@ -80,6 +80,7 @@
     }
 
     public void testLogin() throws Exception {
+        //GERONIMO-3388 consider turning on principal wrapping and expecting a RealmPrincipal
and DomainPrincipal.
         try {
             LoginContext context = new LoginContext("TOOLAZYDOGS.COM");
 
@@ -91,16 +92,15 @@
 
             assertTrue("expected non-null server-side subject", subject != null);
             assertTrue("id of server-side subject should be non-null", ContextManager.getSubjectId(subject)
!= null);
-            assertEquals("server-side subject should have three principals", 3, subject.getPrincipals().size());
-            assertEquals("server-side subject should have one realm principal", 1, subject.getPrincipals(RealmPrincipal.class).size());
+            assertEquals("server-side subject should have two principals", 2, subject.getPrincipals().size());
             assertEquals("server-side subject should have one identification principal",
1, subject.getPrincipals(IdentificationPrincipal.class).size());
             assertEquals("server-side subject should have one kerberos principal", 1, subject.getPrincipals(KerberosPrincipal.class).size());
-            RealmPrincipal principal = (RealmPrincipal) subject.getPrincipals(RealmPrincipal.class).iterator().next();
 
             context.logout();
 
             assertTrue("id of subject should be null", ContextManager.getSubjectId(subject)
== null);
         } catch (LoginException e) {
+            //See GERONIMO-3388.  This seems to be the normal code path.
             e.printStackTrace();
             // May not have kerberos
         }



Mime
View raw message