Skip to content
Snippets Groups Projects
Commit 06a8f00d authored by Brian Major's avatar Brian Major
Browse files

nep110 - added logging to LdapDAO tests

parent d495d782
No related branches found
No related tags found
No related merge requests found
......@@ -126,11 +126,12 @@ public class LdapConfig
public static LdapConfig getLdapConfig(final String ldapProperties)
{
logger.debug("Reading LDAP properties from: " + ldapProperties);
PropertiesReader pr = new PropertiesReader(ldapProperties);
MultiValuedProperties config = pr.getAllProperties();
if (config.keySet() == null)
if (config == null || config.keySet() == null)
{
throw new RuntimeException("failed to read any LDAP property ");
}
......
......@@ -76,9 +76,11 @@ import javax.security.auth.x500.X500Principal;
import ca.nrc.cadc.auth.HttpPrincipal;
import ca.nrc.cadc.auth.NumericPrincipal;
import ca.nrc.cadc.util.Log4jInit;
import com.unboundid.ldap.sdk.LDAPConnection;
import org.apache.log4j.Level;
import org.junit.Test;
import org.junit.BeforeClass;
import static org.junit.Assert.*;
......@@ -91,8 +93,9 @@ public class LdapDAOTest extends AbstractLdapDAOTest
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Log4jInit.setLevel("ca.nrc.cadc.ac", Level.INFO);
// get the configuration of the development server from and config files...
config = getLdapConfig();
config = getLdapConfig();
}
@Test
public void testLdapBindConnection() throws Exception
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment