directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r678783 - in /directory/apacheds/branches/bigbang: protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/ server-unit/src/main/java/org/apache/directory/server/unit/ server-unit/src/test/java/org/apache/directory/server/ ...
Date Tue, 22 Jul 2008 15:58:26 GMT
Author: akarasulu
Date: Tue Jul 22 08:58:26 2008
New Revision: 678783

URL: http://svn.apache.org/viewvc?rev=678783&view=rev
Log:
removing poor setAllowAnonymous() method from abstract server - this should be explicitly
handled in the configureDirectoryService() methods.

Modified:
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
    directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java?rev=678783&r1=678782&r2=678783&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
(original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
Tue Jul 22 08:58:26 2008
@@ -83,7 +83,6 @@
     {
         super.setUp();
 
-        setAllowAnonymousAccess( false );
         ldapServer.setSaslHost( "localhost" );
         ldapServer.setSaslPrincipal( "ldap/localhost@EXAMPLE.COM" );
 
@@ -150,6 +149,7 @@
 
     protected void configureDirectoryService() throws NamingException
     {
+        directoryService.setAllowAnonymousAccess( false );
         Set<Partition> partitions = new HashSet<Partition>();
 
         // Add partition 'example'
@@ -158,9 +158,9 @@
         partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
-        indexedAttrs.add( new JdbmIndex( "ou" ) );
-        indexedAttrs.add( new JdbmIndex( "dc" ) );
-        indexedAttrs.add( new JdbmIndex( "objectClass" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );
         partition.setIndexedAttributes( indexedAttrs );
 
         ServerEntry serverEntry = new DefaultServerEntry( directoryService.getRegistries(),
new LdapDN( "dc=example, dc=com" ) );

Modified: directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=678783&r1=678782&r2=678783&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
(original)
+++ directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
Tue Jul 22 08:58:26 2008
@@ -317,13 +317,6 @@
     }
 
 
-    protected void setAllowAnonymousAccess( boolean anonymousAccess )
-    {
-        directoryService.setAllowAnonymousAccess( anonymousAccess );
-        ldapServer.setAllowAnonymousAccess( anonymousAccess );
-    }
-
-    
     /**
      * Deletes the Eve working directory.
      * @param wkdir the directory to delete

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?rev=678783&r1=678782&r2=678783&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
(original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
Tue Jul 22 08:58:26 2008
@@ -54,7 +54,6 @@
 import org.apache.directory.shared.ldap.message.MutableControl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
-import org.apache.directory.shared.ldap.util.EmptyEnumeration;
 
 
 /**
@@ -81,21 +80,23 @@
     public void setUp() throws Exception
     {
         super.setUp();
-        if ( this.getName().equals( "testDisableAnonymousBinds" ) ||
-                this.getName().equals( "testCompareWithoutAuthentication" ) ||
-                this.getName().equals( "testEnableAnonymousBindsOnRootDSE" ) )
-        {
-            setAllowAnonymousAccess( false );
-        } else if ( this.getName().equals( "testAnonymousBindsEnabledBaseSearch" ) )
-        {
-            setAllowAnonymousAccess( true );
-        }
     }
 
 
     @Override
     protected void configureDirectoryService() throws NamingException
     {
+        if ( this.getName().equals( "testDisableAnonymousBinds" ) ||
+            this.getName().equals( "testCompareWithoutAuthentication" ) ||
+            this.getName().equals( "testEnableAnonymousBindsOnRootDSE" ) )
+        {
+            directoryService.setAllowAnonymousAccess( false );
+        } 
+        else if ( this.getName().equals( "testAnonymousBindsEnabledBaseSearch" ) )
+        {
+            directoryService.setAllowAnonymousAccess( true );
+        }
+
         if ( this.getName().equals( "testUserAuthOnMixedCaseSuffix" ) )
         {
             Set<Partition> partitions = new HashSet<Partition>();
@@ -111,7 +112,7 @@
             partition.setId( "apache" );
             partition.setContextEntry( serverEntry );
             Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
-            indexedAttributes.add( new JdbmIndex( "dc" ) );
+            indexedAttributes.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
             partition.setIndexedAttributes( indexedAttributes );
             partitions.add( partition );
             directoryService.setPartitions( partitions );
@@ -139,6 +140,7 @@
         }
     }
 
+    
     public void testCompareWithoutAuthentication() throws LDAPException
     {
         LDAPConnection conn = new LDAPConnection();

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java?rev=678783&r1=678782&r2=678783&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
(original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
Tue Jul 22 08:58:26 2008
@@ -63,11 +63,8 @@
     public void setUp() throws Exception
     {
         super.setUp();
-        setAllowAnonymousAccess( false );
 
         Attributes attrs;
-
-
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
         env.put( "java.naming.provider.url", "ldap://localhost:" + port + "/dc=example,dc=com"
);
@@ -80,8 +77,10 @@
         users = ctx.createSubcontext( "ou=users", attrs );
     }
 
+    
     protected void configureDirectoryService() throws NamingException
     {
+        directoryService.setAllowAnonymousAccess( false );
         Set<Partition> partitions = new HashSet<Partition>();
 
         // Add partition 'example'
@@ -90,9 +89,9 @@
         partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
-        indexedAttrs.add( new JdbmIndex( "ou" ) );
-        indexedAttrs.add( new JdbmIndex( "dc" ) );
-        indexedAttrs.add( new JdbmIndex( "objectClass" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );
         partition.setIndexedAttributes( indexedAttrs );
 
         LdapDN exampleDn = new LdapDN( "dc=example,dc=com" );

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java?rev=678783&r1=678782&r2=678783&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
(original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
Tue Jul 22 08:58:26 2008
@@ -84,7 +84,6 @@
     {
         provider = new BogusNtlmProvider();
         super.setUp();
-        setAllowAnonymousAccess( false );
 
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -106,15 +105,17 @@
     @Override
     protected void configureDirectoryService() throws NamingException
     {
+        directoryService.setAllowAnonymousAccess( false );
+
         Set<Partition> partitions = new HashSet<Partition>();
         JdbmPartition partition = new JdbmPartition();
         partition.setId( "example" );
         partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
-        indexedAttrs.add( new JdbmIndex( "ou" ) );
-        indexedAttrs.add( new JdbmIndex( "dc" ) );
-        indexedAttrs.add( new JdbmIndex( "objectClass" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "ou" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "dc" ) );
+        indexedAttrs.add( new JdbmIndex<String,ServerEntry>( "objectClass" ) );
         partition.setIndexedAttributes( indexedAttrs );
 
         LdapDN exampleDn = new LdapDN( "dc=example,dc=com" );

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java?rev=678783&r1=678782&r2=678783&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java
(original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java
Tue Jul 22 08:58:26 2008
@@ -69,7 +69,6 @@
     public void setUp() throws Exception
     {
         super.setUp();
-        setAllowAnonymousAccess( true );
 
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -91,6 +90,8 @@
     @Override
     protected void configureDirectoryService() throws NamingException
     {
+        directoryService.setAllowAnonymousAccess( true );
+
         Set<Partition> partitions = new HashSet<Partition>();
         JdbmPartition partition = new JdbmPartition();
         partition.setId( "example" );



Mime
View raw message