]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Define tests for persistent search LDAP server
authorNick Porter <nick@portercomputing.co.uk>
Thu, 21 Apr 2022 15:29:26 +0000 (16:29 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 29 Aug 2022 13:14:00 +0000 (14:14 +0100)
16 files changed:
src/tests/ldap_sync/persistent_search/01_add.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/01_add.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/02_mod.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/02_mod.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/03_mod.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/03_mod.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/04_del.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/04_del.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/05_add.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/05_add.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/06_mod.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/06_mod.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/07_mod.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/07_mod.out [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/08_del.ldif [new file with mode: 0644]
src/tests/ldap_sync/persistent_search/08_del.out [new file with mode: 0644]

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 (file)
index 0000000..57f5e05
--- /dev/null
@@ -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 (file)
index 0000000..7c12ce5
--- /dev/null
@@ -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 (file)
index 0000000..1937ddc
--- /dev/null
@@ -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 (file)
index 0000000..712add7
--- /dev/null
@@ -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 (file)
index 0000000..23acc27
--- /dev/null
@@ -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 (file)
index 0000000..b0cd56b
--- /dev/null
@@ -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 (file)
index 0000000..dce2158
--- /dev/null
@@ -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 (file)
index 0000000..69e9484
--- /dev/null
@@ -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 (file)
index 0000000..1cb62f3
--- /dev/null
@@ -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 (file)
index 0000000..dd7917d
--- /dev/null
@@ -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 (file)
index 0000000..bd84f66
--- /dev/null
@@ -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 (file)
index 0000000..78f0497
--- /dev/null
@@ -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 (file)
index 0000000..96164ba
--- /dev/null
@@ -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 (file)
index 0000000..9108260
--- /dev/null
@@ -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 (file)
index 0000000..ddf67e2
--- /dev/null
@@ -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 (file)
index 0000000..cf0dd40
--- /dev/null
@@ -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