directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r663849 - /directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
Date Fri, 06 Jun 2008 07:54:25 GMT
Author: akarasulu
Date: Fri Jun  6 00:54:25 2008
New Revision: 663849

URL: http://svn.apache.org/viewvc?rev=663849&view=rev
Log:
fixing a few more tests as we make binds work again

Modified:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=663849&r1=663848&r2=663849&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
Fri Jun  6 00:54:25 2008
@@ -65,7 +65,8 @@
         {
             LdapDN dn = new LdapDN( "uid=admin,ou=system" );
             dn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping()
);
-            return null; // TODO service.getJndiContext( new LdapPrincipal( dn, AuthenticationLevel.SIMPLE
) );
+            return new ServerLdapContext( service, 
+                service.getSession( new LdapDN( dn ), "secret".getBytes() ), new LdapDN()
);
         }
 
         throw new IllegalStateException( "Cannot acquire rootDSE before the service has been
started!" );
@@ -156,12 +157,12 @@
 
 
     @Test
-    @Ignore ( "broken until authentication is fixed" )
     public void test3UseAkarasulu() throws Exception
     {
         apply( getRootDSE(), getUserAddLdif() );
         String userDn = "uid=akarasulu,ou=users,ou=system";
-        LdapContext ctx = null; // TODO service.getJndiContext( new LdapDN( userDn ), userDn,
"test".getBytes(), "simple", userDn );
+        LdapContext ctx = new ServerLdapContext( service, 
+            service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn
) );
 
         Attributes attrs = ctx.getAttributes( "" );
         Attribute ou = attrs.get( "ou" );
@@ -193,11 +194,11 @@
      * @throws Exception if anything goes wrong
      */
     @Test
-    @Ignore ( "broken until authentication is fixed" )
     public void test8PassPrincAuthTypeSimple() throws Exception
     {
         String userDn = "uid=admin,ou=system";
-        // TODO assertNotNull( service.getJndiContext( new LdapDN( userDn ), userDn, "secret".getBytes(),
"simple", userDn ) );
+        assertNotNull( new ServerLdapContext( service, 
+            service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN(
userDn ) ) );
     }
 
 
@@ -208,12 +209,12 @@
      * @throws Exception if anything goes wrong
      */
     @Test
-    @Ignore ( "broken until authentication is fixed" )
     public void test10TestNonAdminUser() throws Exception
     {
         apply( getRootDSE(), getUserAddLdif() );
         String userDn = "uid=akarasulu,ou=users,ou=system";
-        // TODO assertNotNull( service.getJndiContext( new LdapDN( userDn ), userDn, "test".getBytes(),
"simple", userDn ) );
+        assertNotNull( new ServerLdapContext( service, 
+            service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn
) ) );
     }
 
 



Mime
View raw message