r9855: Finish ldb_map testsuite
authorJelmer Vernooij <jelmer@samba.org>
Thu, 1 Sep 2005 00:38:28 +0000 (00:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:36:18 +0000 (13:36 -0500)
Update PLAN
Some more small other fixes

testprogs/ejs/samba3sam

index 75e9f6586318d16dd678b4e8360419870cfc2639..26c3248f07082aba5c4f14e3eed6edfc56eedeb0 100755 (executable)
@@ -122,3 +122,63 @@ msg = s3.search("(cn=Niemand)");
 assert(msg.length >= 1);
 assert(msg[0].displayName == "Niemand");
 
+println("Adding attribute...");
+ok = s4.modify("
+dn: cn=Niemand,ou=Tests,dc=vernstok,dc=nl
+changetype: modify
+add: description
+description: Blah
+");
+assert(ok);
+
+println("Checking whether changes are still there...");
+msg = s4.search("(cn=Niemand)");
+assert(msg.length >= 1);
+assert(msg[0].description == "Blah");
+
+println("Modifying attribute...");
+ok = s4.modify("
+dn: cn=Niemand,ou=Tests,dc=vernstok,dc=nl
+changetype: modify
+replace: description
+description: Blie
+");
+assert(ok);
+
+println("Checking whether changes are still there...");
+msg = s4.search("(cn=Niemand)");
+assert(msg.length >= 1);
+assert(msg[0].description == "Blie");
+
+println("Deleting attribute...");
+ok = s4.modify("
+dn: cn=Niemand,ou=Tests,dc=vernstok,dc=nl
+changetype: modify
+delete: description
+");
+assert(ok);
+
+println("Checking whether changes are no longer there...");
+msg = s4.search("(cn=Niemand)");
+assert(msg.length >= 1);
+assert(msg[0].description == undefined);
+
+println("Renaming record...");
+ok = s4.rename("cn=Niemand,ou=Tests,dc=vernstok,dc=nl", "cn=Iemand,ou=Tests,dc=vernstok,dc=nl");
+
+println("Checking whether old record is gone...");
+msg = s4.search("(cn=Niemand)");
+assert(msg.length == 0);
+
+println("Checking whether new record is there...");
+msg = s4.search("(cn=Iemand)");
+assert(msg.length == 1);
+
+println("Deleting record...");
+ok = s4.del("cn=Iemand,ou=Tests,dc=vernstok,dc=nl");
+assert(ok);
+
+println("Checking whether record is gone...");
+msg = s4.search("(cn=Iemand)");
+assert(msg.length == 0);
+