Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gplazma2-ldap: add embedded jdap server for unit testing
Motivation: current ldap plugin requires running ldap server for unit tests. Worse, the ldap server must contain a special configuration, which makes testing not portable. THis change added an embedded ldap server with corresponding ldif file and updates the test to use it. Modification: added dependency on ldap4testing module. Update gplazma plugin to match the provided ldif file. Updated test to start and stop embedded server during testing. Result: more code tested Acked-by: Gerd Behrmann Target: master Require-book: no Require-notes: no
- Loading branch information
Showing
4 changed files
with
122 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
modules/gplazma2-ldap/src/test/resources/org/dcache/gplazma/plugins/ldap/init.ldif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
dn: o=dcache,c=org | ||
dc: o=dcache | ||
objectClass: top | ||
objectClass: domain | ||
|
||
dn: ou=people,o=dcache,c=org | ||
ou: people | ||
objectClass: top | ||
objectclass: organizationalunit | ||
|
||
dn: ou=group,o=dcache,c=org | ||
ou: group | ||
objectClass: top | ||
objectclass: organizationalunit | ||
|
||
dn: uid=kermit,ou=people,o=dcache,c=org | ||
objectClass: posixAccount | ||
objectClass: inetorgperson | ||
objectClass: organizationalperson | ||
objectClass: top | ||
uid: kermit | ||
description: This is the description for Kermit the Frog | ||
userPassword: kermitTheFrog | ||
employeeNumber: 1 | ||
initials: kTf | ||
givenName: Kermit | ||
cn: Kermit The Frog | ||
sn: Frog | ||
mail: kermit.the.frog@dcache.org | ||
l: Hamburg | ||
st: DE | ||
gidNumber: 1000 | ||
homeDirectory: /home/kermit | ||
uidNumber: 1000 | ||
|
||
dn: uid=bernd,ou=people,o=dcache,c=org | ||
objectClass: posixAccount | ||
objectClass: inetorgperson | ||
objectClass: organizationalperson | ||
objectClass: top | ||
uid: bernd | ||
description: This is the description for Bernd das Brot | ||
userPassword: berndDasBrot | ||
employeeNumber: 2 | ||
initials: BdB | ||
givenName: Bernd | ||
cn: Bernd das Brot | ||
sn: Brot | ||
mail: bernd.das.brot@dcache.org | ||
l: Hamburg | ||
st: DE | ||
gidNumber: 1000 | ||
homeDirectory: /home/bernd | ||
uidNumber: 1001 | ||
|
||
|
||
dn: cn=actor,ou=group,o=dcache,c=org | ||
objectClass: groupOfUniqueNames | ||
objectClass: posixGroup | ||
objectClass: top | ||
cn: actor | ||
uniqueMember: uid=bernd,ou=people,o=dcache,c=org | ||
uniqueMember: uid=kermit,ou=people,o=dcache,c=org | ||
gidNumber: 1001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters