mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r26479: Further test behaviour of 'attribute or value exists'.
Andrew Bartlett
This commit is contained in:
parent
d88527a9d6
commit
11c153163c
@ -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
|
||||
@ -146,6 +147,32 @@ servicePrincipalName: host/ldaptest2computer
|
||||
servicePrincipalName: cifs/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.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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user