From: Nick Porter Date: Wed, 13 Apr 2022 09:30:27 +0000 (+0100) Subject: Define tests for RFC4533 LDAP server X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b71e4dc2d0c8011b9b81066e6198de8ff4c4afd;p=thirdparty%2Ffreeradius-server.git Define tests for RFC4533 LDAP server --- diff --git a/src/tests/ldap_sync/rfc4533/01_add.ldif b/src/tests/ldap_sync/rfc4533/01_add.ldif new file mode 100644 index 00000000000..a09c5a9fd85 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/01_add.ldif @@ -0,0 +1,18 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: uid=fred,ou=people,dc=example,dc=com +changeType: add +objectClass: inetOrgPerson +objectClass: posixAccount +objectClass: shadowAccount +uid: fred +sn: Smith +givenName: Fred +cn: Fred Smith +displayName: Fred Smith +userPassword: testing +uidNumber: 102 +gidNumber: 102 +homeDirectory: /home/fred + diff --git a/src/tests/ldap_sync/rfc4533/01_add.out b/src/tests/ldap_sync/rfc4533/01_add.out new file mode 100644 index 00000000000..226a3472662 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/01_add.out @@ -0,0 +1 @@ +Add ou=people,dc=example,dc=com uid=fred,ou=people,dc=example,dc=com fred diff --git a/src/tests/ldap_sync/rfc4533/02_mod.ldif b/src/tests/ldap_sync/rfc4533/02_mod.ldif new file mode 100644 index 00000000000..245733ada2a --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/02_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: uid=fred,ou=people,dc=example,dc=com +changeType: modify +replace: displayName +displayName: Frederic Smith + diff --git a/src/tests/ldap_sync/rfc4533/02_mod.out b/src/tests/ldap_sync/rfc4533/02_mod.out new file mode 100644 index 00000000000..b183d2c6650 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/02_mod.out @@ -0,0 +1 @@ +Modify ou=people,dc=example,dc=com uid=fred,ou=people,dc=example,dc=com fred diff --git a/src/tests/ldap_sync/rfc4533/03_mod.ldif b/src/tests/ldap_sync/rfc4533/03_mod.ldif new file mode 100644 index 00000000000..d91c163af8a --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/03_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: uid=fred,ou=people,dc=example,dc=com +changeType: modrdn +newrdn: uid=frederic +deleteoldrdn: 1 + diff --git a/src/tests/ldap_sync/rfc4533/03_mod.out b/src/tests/ldap_sync/rfc4533/03_mod.out new file mode 100644 index 00000000000..edd6e7d42f7 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/03_mod.out @@ -0,0 +1 @@ +Modify ou=people,dc=example,dc=com uid=frederic,ou=people,dc=example,dc=com frederic diff --git a/src/tests/ldap_sync/rfc4533/04_del.ldif b/src/tests/ldap_sync/rfc4533/04_del.ldif new file mode 100644 index 00000000000..2ea7109a602 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/04_del.ldif @@ -0,0 +1,6 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: uid=frederic,ou=people,dc=example,dc=com +changetype: delete + diff --git a/src/tests/ldap_sync/rfc4533/04_del.out b/src/tests/ldap_sync/rfc4533/04_del.out new file mode 100644 index 00000000000..192925f85b0 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/04_del.out @@ -0,0 +1 @@ +Delete ou=people,dc=example,dc=com uid=frederic,ou=people,dc=example,dc=com diff --git a/src/tests/ldap_sync/rfc4533/05_add.ldif b/src/tests/ldap_sync/rfc4533/05_add.ldif new file mode 100644 index 00000000000..41aa0d0a1c4 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/05_add.ldif @@ -0,0 +1,11 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: cn=bosses,ou=groups,dc=example,dc=com +changeType: add +cn: bosses +objectClass: groupOfNames +objectClass: top +member: uid=bob,ou=people,dc=example,dc=com +member: uid=john,ou=people,dc=example,dc=com + diff --git a/src/tests/ldap_sync/rfc4533/05_add.out b/src/tests/ldap_sync/rfc4533/05_add.out new file mode 100644 index 00000000000..96cc5f2bc0f --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/05_add.out @@ -0,0 +1,3 @@ +Add ou=groups,dc=example,dc=com cn=bosses,ou=groups,dc=example,dc=com +Group member uid=bob,ou=people,dc=example,dc=com +Group member uid=john,ou=people,dc=example,dc=com diff --git a/src/tests/ldap_sync/rfc4533/06_mod.ldif b/src/tests/ldap_sync/rfc4533/06_mod.ldif new file mode 100644 index 00000000000..ae5da2da83c --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/06_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: cn=foo,ou=groups,dc=example,dc=com +changetype: modify +add: member +member: uid=bob,ou=people,dc=example,dc=com + diff --git a/src/tests/ldap_sync/rfc4533/06_mod.out b/src/tests/ldap_sync/rfc4533/06_mod.out new file mode 100644 index 00000000000..e5b589ab2b2 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/06_mod.out @@ -0,0 +1,3 @@ +Modify ou=groups,dc=example,dc=com cn=foo,ou=groups,dc=example,dc=com +Group member uid=john,ou=people,dc=example,dc=com +Group member uid=bob,ou=people,dc=example,dc=com diff --git a/src/tests/ldap_sync/rfc4533/07_mod.ldif b/src/tests/ldap_sync/rfc4533/07_mod.ldif new file mode 100644 index 00000000000..b62c8948343 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/07_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: cn=foo,ou=groups,dc=example,dc=com +changetype: modify +delete: member +member: uid=bob,ou=people,dc=example,dc=com + diff --git a/src/tests/ldap_sync/rfc4533/07_mod.out b/src/tests/ldap_sync/rfc4533/07_mod.out new file mode 100644 index 00000000000..8af64be44c9 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/07_mod.out @@ -0,0 +1,2 @@ +Modify ou=groups,dc=example,dc=com cn=foo,ou=groups,dc=example,dc=com +Group member uid=john,ou=people,dc=example,dc=com diff --git a/src/tests/ldap_sync/rfc4533/08_del.ldif b/src/tests/ldap_sync/rfc4533/08_del.ldif new file mode 100644 index 00000000000..08dab7ea9fa --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/08_del.ldif @@ -0,0 +1,6 @@ +# +# ARGV: -x -H ${RFC4533_TEST_SERVER} -D "cn=admin,dc=example,dc=com" -w "secret" +# +dn: cn=bosses,ou=groups,dc=example,dc=com +changetype: delete + diff --git a/src/tests/ldap_sync/rfc4533/08_del.out b/src/tests/ldap_sync/rfc4533/08_del.out new file mode 100644 index 00000000000..9f40247ef44 --- /dev/null +++ b/src/tests/ldap_sync/rfc4533/08_del.out @@ -0,0 +1 @@ +Delete ou=groups,dc=example,dc=com cn=bosses,ou=groups,dc=example,dc=com