Revert "Reuse spring.ldap.base in Embedded support"
This commit is contained in:
parent
5e2ec29413
commit
1254c44985
|
|
@ -98,7 +98,6 @@ public class EmbeddedLdapAutoConfiguration {
|
||||||
source.setPassword(this.embeddedProperties.getCredential().getPassword());
|
source.setPassword(this.embeddedProperties.getCredential().getPassword());
|
||||||
}
|
}
|
||||||
source.setUrls(this.properties.determineUrls(this.environment));
|
source.setUrls(this.properties.determineUrls(this.environment));
|
||||||
source.setBase(this.properties.getBase());
|
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,21 +131,6 @@ public class EmbeddedLdapAutoConfigurationTests {
|
||||||
assertThat(ldapTemplate.list("ou=company1,c=Sweden,dc=spring,dc=org")).hasSize(4);
|
assertThat(ldapTemplate.list("ou=company1,c=Sweden,dc=spring,dc=org")).hasSize(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testQueryEmbeddedLdapWithBase() throws LDAPException {
|
|
||||||
TestPropertyValues.of("spring.ldap.embedded.base-dn:dc=spring,dc=org",
|
|
||||||
"spring.ldap.base:dc=spring,dc=org")
|
|
||||||
.applyTo(this.context);
|
|
||||||
this.context.register(EmbeddedLdapAutoConfiguration.class,
|
|
||||||
LdapAutoConfiguration.class, LdapDataAutoConfiguration.class,
|
|
||||||
PropertyPlaceholderAutoConfiguration.class);
|
|
||||||
this.context.refresh();
|
|
||||||
assertThat(this.context.getBeanNamesForType(LdapTemplate.class).length)
|
|
||||||
.isEqualTo(1);
|
|
||||||
LdapTemplate ldapTemplate = this.context.getBean(LdapTemplate.class);
|
|
||||||
assertThat(ldapTemplate.list("ou=company1,c=Sweden")).hasSize(4);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisableSchemaValidation() throws LDAPException {
|
public void testDisableSchemaValidation() throws LDAPException {
|
||||||
load("spring.ldap.embedded.validation.enabled:false",
|
load("spring.ldap.embedded.validation.enabled:false",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue