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();
}
Aggregations