Search in sources :

Example 1 with LdapUserGroupBuilder

use of org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder in project ranger by apache.

the class TestLdapUserGroup method setup.

@Before
public void setup() throws Exception {
    LdapServer ldapServer = new LdapServer();
    ldapServer.setSaslHost("127.0.0.1");
    ldapServer.setSearchBaseDn("DC=ranger,DC=qe,DC=hortonworks,DC=com");
    String ldapPort = System.getProperty("ldap.port");
    Assert.assertNotNull("Property 'ldap.port' null", ldapPort);
    ldapServer.setTransports(new TcpTransport("127.0.0.1", Integer.parseInt(ldapPort)));
    ldapServer.setDirectoryService(getService());
    ldapServer.setMaxSizeLimit(LdapServer.NO_SIZE_LIMIT);
    setLdapServer(ldapServer);
    getService().startup();
    getLdapServer().start();
    config = UserGroupSyncConfig.getInstance();
    ldapBuilder = new LdapUserGroupBuilder();
    sink = new PolicyMgrUserGroupBuilderTest();
}
Also used : LdapServer(org.apache.directory.server.ldap.LdapServer) TcpTransport(org.apache.directory.server.protocol.shared.transport.TcpTransport) LdapUserGroupBuilder(org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder) Before(org.junit.Before)

Aggregations

LdapServer (org.apache.directory.server.ldap.LdapServer)1 TcpTransport (org.apache.directory.server.protocol.shared.transport.TcpTransport)1 LdapUserGroupBuilder (org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder)1 Before (org.junit.Before)1