Commit 7c85261d authored by Patrick Dowler's avatar Patrick Dowler
Browse files

Merge branch 'nep110' of /srv/cadc/git/wopencadc into s1689

parents a590f423 06a8f00d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 ");
        }
+4 −1
Original line number Diff line number Diff line
@@ -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,6 +93,7 @@ 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();        
    }