From: Nick Porter Date: Thu, 21 Apr 2022 15:29:26 +0000 (+0100) Subject: Define tests for persistent search LDAP server X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f509c29693120d021280fb5bb8ccdaef101a4d;p=thirdparty%2Ffreeradius-server.git Define tests for persistent search LDAP server --- diff --git a/src/tests/ldap_sync/persistent_search/01_add.ldif b/src/tests/ldap_sync/persistent_search/01_add.ldif new file mode 100644 index 00000000000..57f5e05e742 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/01_add.ldif @@ -0,0 +1,18 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +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/persistent_search/01_add.out b/src/tests/ldap_sync/persistent_search/01_add.out new file mode 100644 index 00000000000..7c12ce5d4da --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/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/persistent_search/02_mod.ldif b/src/tests/ldap_sync/persistent_search/02_mod.ldif new file mode 100644 index 00000000000..1937ddcab90 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/02_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +dn: uid=fred,ou=people,dc=example,dc=com +changeType: modify +replace: displayName +displayName: Frederic Smith + diff --git a/src/tests/ldap_sync/persistent_search/02_mod.out b/src/tests/ldap_sync/persistent_search/02_mod.out new file mode 100644 index 00000000000..712add7476d --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/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/persistent_search/03_mod.ldif b/src/tests/ldap_sync/persistent_search/03_mod.ldif new file mode 100644 index 00000000000..23acc27f622 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/03_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +dn: uid=fred,ou=people,dc=example,dc=com +changeType: modrdn +newrdn: uid=frederic +deleteoldrdn: 1 + diff --git a/src/tests/ldap_sync/persistent_search/03_mod.out b/src/tests/ldap_sync/persistent_search/03_mod.out new file mode 100644 index 00000000000..b0cd56b7dd7 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/03_mod.out @@ -0,0 +1 @@ +Modify ou=people,dc=example,dc=com uid=frederic,ou=people,dc=example,dc=com uid=fred,ou=people,dc=example,dc=com frederic diff --git a/src/tests/ldap_sync/persistent_search/04_del.ldif b/src/tests/ldap_sync/persistent_search/04_del.ldif new file mode 100644 index 00000000000..dce215888a7 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/04_del.ldif @@ -0,0 +1,6 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +dn: uid=frederic,ou=people,dc=example,dc=com +changetype: delete + diff --git a/src/tests/ldap_sync/persistent_search/04_del.out b/src/tests/ldap_sync/persistent_search/04_del.out new file mode 100644 index 00000000000..69e9484ac8a --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/04_del.out @@ -0,0 +1 @@ +Delete ou=people,dc=example,dc=com uid=frederic,ou=people,dc=example,dc=com frederic diff --git a/src/tests/ldap_sync/persistent_search/05_add.ldif b/src/tests/ldap_sync/persistent_search/05_add.ldif new file mode 100644 index 00000000000..1cb62f3739e --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/05_add.ldif @@ -0,0 +1,11 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +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/persistent_search/05_add.out b/src/tests/ldap_sync/persistent_search/05_add.out new file mode 100644 index 00000000000..dd7917d7d1c --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/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/persistent_search/06_mod.ldif b/src/tests/ldap_sync/persistent_search/06_mod.ldif new file mode 100644 index 00000000000..bd84f66c9ae --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/06_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +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/persistent_search/06_mod.out b/src/tests/ldap_sync/persistent_search/06_mod.out new file mode 100644 index 00000000000..78f04978736 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/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/persistent_search/07_mod.ldif b/src/tests/ldap_sync/persistent_search/07_mod.ldif new file mode 100644 index 00000000000..96164babf7a --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/07_mod.ldif @@ -0,0 +1,8 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +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/persistent_search/07_mod.out b/src/tests/ldap_sync/persistent_search/07_mod.out new file mode 100644 index 00000000000..91082604507 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/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/persistent_search/08_del.ldif b/src/tests/ldap_sync/persistent_search/08_del.ldif new file mode 100644 index 00000000000..ddf67e26ded --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/08_del.ldif @@ -0,0 +1,6 @@ +# +# ARGV: -x -H ${PERSISTENT_SEARCH_TEST_SERVER} -D "cn=manager" -w "secret123" +# +dn: cn=bosses,ou=groups,dc=example,dc=com +changetype: delete + diff --git a/src/tests/ldap_sync/persistent_search/08_del.out b/src/tests/ldap_sync/persistent_search/08_del.out new file mode 100644 index 00000000000..cf0dd401eb0 --- /dev/null +++ b/src/tests/ldap_sync/persistent_search/08_del.out @@ -0,0 +1,3 @@ +Delete 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