From 99054eb40a4ce3e2b065132129cb5f8db4db0f78 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 1 Sep 2005 00:38:28 +0000 Subject: r9855: Finish ldb_map testsuite Update PLAN Some more small other fixes (This used to be commit 31cd5d55a9754b4e670be5d3687dfaaab8adaefc) --- testprogs/ejs/samba3sam | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'testprogs/ejs/samba3sam') diff --git a/testprogs/ejs/samba3sam b/testprogs/ejs/samba3sam index 75e9f65863..26c3248f07 100755 --- a/testprogs/ejs/samba3sam +++ b/testprogs/ejs/samba3sam @@ -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); + -- cgit