diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-12-17 02:13:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:50:37 +0100 |
commit | 449c681d5bbab9ad4b432d8c5233046c863f954a (patch) | |
tree | bb54730ca8e6d0511226780a7cab7838b972d054 /testprogs/ejs | |
parent | 440fd879613b94cc75eb0737af91602d96c89bf9 (diff) | |
download | samba-449c681d5bbab9ad4b432d8c5233046c863f954a.tar.gz samba-449c681d5bbab9ad4b432d8c5233046c863f954a.tar.xz samba-449c681d5bbab9ad4b432d8c5233046c863f954a.zip |
r26479: Further test behaviour of 'attribute or value exists'.
Andrew Bartlett
(This used to be commit 11c153163c359fd07402daa61b93872387e12568)
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-x | testprogs/ejs/ldap.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js index bc7d8ec341c..6af70971ebc 100755 --- a/testprogs/ejs/ldap.js +++ b/testprogs/ejs/ldap.js @@ -137,6 +137,7 @@ displayname: ldap testy } } + println("Testing attribute or value exists behaviour"); ok = ldb.modify(" dn: cn=ldaptest2computer,cn=computers," + base_dn + " changetype: modify @@ -152,6 +153,32 @@ servicePrincipalName: cifs/ldaptest2computer assert(ok.error == 20); } + ok = ldb.modify(" +dn: cn=ldaptest2computer,cn=computers," + base_dn + " +changetype: modify +replace: servicePrincipalName +servicePrincipalName: host/ldaptest2computer +servicePrincipalName: cifs/ldaptest2computer +"); + + if (ok.error != 0) { + println("Failed to replace servicePrincpalName:" + ok.errstr); + assert(ok.error == 20); + } + + ok = ldb.modify(" +dn: cn=ldaptest2computer,cn=computers," + base_dn + " +changetype: modify +add: servicePrincipalName +servicePrincipalName: host/ldaptest2computer +"); + +//LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS + if (ok.error != 20) { + println("Expected error LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS, got :" + ok.errstr); + assert(ok.error == 20); + } + ok = ldb.add(" dn: cn=ldaptestuser2,cn=useRs," + base_dn + " objectClass: person |