Merge branch '2.7.x'
Closes gh-33739
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -141,11 +141,11 @@ class EmbeddedLdapAutoConfigurationTests {
|
||||
@Test
|
||||
void testMultiBaseDn() {
|
||||
this.contextRunner.withPropertyValues("spring.ldap.embedded.ldif:classpath:schema-multi-basedn.ldif",
|
||||
"spring.ldap.embedded.base-dn[0]:dc=spring,dc=org", "spring.ldap.embedded.base-dn[1]:dc=pivotal,dc=io")
|
||||
"spring.ldap.embedded.base-dn[0]:dc=spring,dc=org", "spring.ldap.embedded.base-dn[1]:dc=vmware,dc=com")
|
||||
.run((context) -> {
|
||||
InMemoryDirectoryServer server = context.getBean(InMemoryDirectoryServer.class);
|
||||
assertThat(server.countEntriesBelow("ou=company1,c=Sweden,dc=spring,dc=org")).isEqualTo(5);
|
||||
assertThat(server.countEntriesBelow("c=Sweden,dc=pivotal,dc=io")).isEqualTo(2);
|
||||
assertThat(server.countEntriesBelow("c=Sweden,dc=vmware,dc=com")).isEqualTo(2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -84,24 +84,24 @@ sn: Person
|
||||
description: Sweden, Company1, Some Person
|
||||
telephoneNumber: +46 555-456321
|
||||
|
||||
dn: dc=pivotal,dc=io
|
||||
dn: dc=vmware,dc=com
|
||||
objectclass: top
|
||||
objectclass: domain
|
||||
objectclass: extensibleObject
|
||||
dc: pivotal
|
||||
dc: vmware
|
||||
|
||||
dn: ou=groups,dc=pivotal,dc=io
|
||||
dn: ou=groups,dc=vmware,dc=com
|
||||
objectclass: top
|
||||
objectclass: organizationalUnit
|
||||
ou: groups
|
||||
|
||||
dn: c=Sweden,dc=pivotal,dc=io
|
||||
dn: c=Sweden,dc=vmware,dc=com
|
||||
objectclass: top
|
||||
objectclass: country
|
||||
c: Sweden
|
||||
description:The country of Sweden
|
||||
|
||||
dn: cn=Some Random Person,c=Sweden,dc=pivotal,dc=io
|
||||
dn: cn=Some Random Person,c=Sweden,dc=vmware,dc=com
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
@@ -110,5 +110,5 @@ uid: some.random.person
|
||||
userPassword: password
|
||||
cn: Some Random Person
|
||||
sn: Person
|
||||
description: Sweden, Pivotal, Some Random Person
|
||||
description: Sweden, VMware, Some Random Person
|
||||
telephoneNumber: +46 555-123456
|
||||
|
||||
Reference in New Issue
Block a user