1 17 package org.apache.ldap.server.jndi; 18 19 20 import org.apache.ldap.server.AbstractCoreTest; 21 22 import javax.naming.directory.Attributes ; 23 24 25 31 public class SyncTest extends AbstractCoreTest 32 { 33 39 public void testSyncNoException() throws Exception 40 { 41 overrides.put( EnvKeys.SYNC, "true" ); 42 sysRoot = setSysRoot( "uid=admin,ou=system", "secret" ); 43 assertNotNull( sysRoot ); 44 } 45 46 47 53 public void testPostSyncLookup() throws Exception 54 { 55 overrides.put( EnvKeys.SYNC, "true" ); 56 sysRoot = setSysRoot( "uid=admin,ou=system", "secret" ); 57 Attributes users = sysRoot.getAttributes( "ou=users" ); 58 59 assertNotNull( users ); 61 assertNotNull( users.get( "ou" ) ); 62 assertTrue( users.get( "ou" ).contains( "users" ) ); 63 assertNotNull( users.get( "objectClass" ) ); 64 assertTrue( users.get( "objectClass" ).contains( "top" ) ); 65 assertTrue( users.get( "objectClass" ).contains( "organizationalUnit" ) ); 66 } 67 } 68 | Popular Tags |