Re-enable some tests which partially work with embedded ApacheDS.
This commit is contained in:
parent
31be69be37
commit
40f50498b2
|
@ -37,13 +37,14 @@ public class FilterBasedLdapUserSearchTests extends AbstractLdapServerTestCase {
|
|||
public FilterBasedLdapUserSearchTests() {
|
||||
super();
|
||||
}
|
||||
/*
|
||||
|
||||
public void testBasicSearch() throws Exception {
|
||||
locator.setSearchBase("ou=people");
|
||||
locator.setSearchFilter("(uid={0})");
|
||||
locator.afterPropertiesSet();
|
||||
LdapUserDetails bob = locator.searchForUser("bob");
|
||||
assertEquals("uid=bob,ou=people,"+ROOT_DN, bob.getDn());
|
||||
// name is wrong with embedded apacheDS
|
||||
// assertEquals("uid=bob,ou=people,"+ROOT_DN, bob.getDn());
|
||||
}
|
||||
|
||||
public void testSubTreeSearchSucceeds() throws Exception {
|
||||
|
@ -51,10 +52,10 @@ public class FilterBasedLdapUserSearchTests extends AbstractLdapServerTestCase {
|
|||
locator.setSearchFilter("(cn={0})");
|
||||
locator.setSearchSubtree(true);
|
||||
locator.afterPropertiesSet();
|
||||
LdapUserDetails bob = locator.searchForUser("Ben Alex");
|
||||
assertEquals("uid=ben,ou=people,"+ROOT_DN, bob.getDn());
|
||||
LdapUserDetails ben = locator.searchForUser("Ben Alex");
|
||||
// assertEquals("uid=ben,ou=people,"+ROOT_DN, bob.getDn());
|
||||
}
|
||||
*/
|
||||
|
||||
public void testSearchForInvalidUserFails() {
|
||||
locator.setSearchBase("ou=people");
|
||||
locator.setSearchFilter("(uid={0})");
|
||||
|
@ -78,14 +79,15 @@ public class FilterBasedLdapUserSearchTests extends AbstractLdapServerTestCase {
|
|||
}
|
||||
|
||||
// Try some funny business with filters.
|
||||
/*
|
||||
public void testExtraFilterPartToExcludeBob() {
|
||||
|
||||
public void testExtraFilterPartToExcludeBob() throws Exception {
|
||||
locator.setSearchBase("ou=people");
|
||||
locator.setSearchFilter("(&(cn=*)(!(uid={0})))");
|
||||
|
||||
// Search for bob, get back ben...
|
||||
LdapUserDetails ben = locator.searchForUser("bob");
|
||||
assertEquals("uid=ben,ou=people,"+ROOT_DN, ben.getDn());
|
||||
String cn = (String)ben.getAttributes().get("cn").get();
|
||||
assertEquals("Ben Alex", cn);
|
||||
// assertEquals("uid=ben,ou=people,"+ROOT_DN, ben.getDn());
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue