mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
samba-tool tests: re-add tests for attribute value verification using samba-tool
Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
6d1a0eb8d1
commit
12b3f26eee
@ -107,6 +107,12 @@ get_attribute_base64_control() {
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
get_attribute_force_no_base64() {
|
||||
# LDB_FLAG_FORCE_NO_BASE64_LDIF should be used here.
|
||||
$PYTHON ${STpath}/source4/scripting/bin/samba-tool computer show \
|
||||
testmachine1 --attributes=displayName \
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
# Test edit computer - change base64 attribute value including control character
|
||||
change_attribute_base64_control() {
|
||||
@ -164,6 +170,7 @@ testit "add_attribute_base64_control" add_attribute_base64_control || failed=`ex
|
||||
testit_grep "get_attribute_base64_control" "^displayName:: $display_name_con_b64" get_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit "change_attribute_base64_control" change_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_base64" "^displayName:: $display_name_b64" get_attribute_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_force_no_base64" "^displayName: $display_name" get_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "change_attribute_force_no_base64" change_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_changed_attribute_force_no_base64" "^displayName: $display_name_new" get_changed_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "delete_computer" delete_computer || failed=`expr $failed + 1`
|
||||
|
@ -93,6 +93,12 @@ get_attribute_base64_control() {
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
get_attribute_force_no_base64() {
|
||||
# LDB_FLAG_FORCE_NO_BASE64_LDIF should be used here.
|
||||
$PYTHON ${STpath}/source4/scripting/bin/samba-tool contact show \
|
||||
testcontact1 --attributes=displayName \
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
# Test edit contact - change base64 attribute value including control character
|
||||
change_attribute_base64_control() {
|
||||
@ -149,6 +155,7 @@ testit "add_attribute_base64_control" add_attribute_base64_control || failed=`ex
|
||||
testit_grep "get_attribute_base64_control" "^displayName:: $display_name_con_b64" get_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit "change_attribute_base64_control" change_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_base64" "^displayName:: $display_name_b64" get_attribute_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_force_no_base64" "^displayName: $display_name" get_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "change_attribute_force_no_base64" change_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_changed_attribute_force_no_base64" "^displayName: $display_name_new" get_changed_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "delete_contact" delete_contact || failed=`expr $failed + 1`
|
||||
|
@ -138,6 +138,12 @@ get_attribute_base64_control() {
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
get_attribute_force_no_base64() {
|
||||
# LDB_FLAG_FORCE_NO_BASE64_LDIF should be used here.
|
||||
$PYTHON ${STpath}/source4/scripting/bin/samba-tool group show \
|
||||
testgroup1 --attributes=displayName \
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
# Test edit group - change base64 attribute value including control character
|
||||
change_attribute_base64_control() {
|
||||
@ -191,6 +197,7 @@ testit "add_attribute_base64_control" add_attribute_base64_control || failed=`ex
|
||||
testit_grep "get_attribute_base64_control" "^displayName:: $display_name_con_b64" get_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit "change_attribute_base64_control" change_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_base64" "^displayName:: $display_name_b64" get_attribute_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_force_no_base64" "^displayName: $display_name" get_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "change_attribute_force_no_base64" change_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_changed_attribute_force_no_base64" "^displayName: $display_name_new" get_changed_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "delete_test_group" delete_test_group || failed=`expr $failed + 1`
|
||||
|
@ -106,6 +106,12 @@ get_attribute_base64_control() {
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
get_attribute_force_no_base64() {
|
||||
# LDB_FLAG_FORCE_NO_BASE64_LDIF should be used here.
|
||||
$PYTHON ${STpath}/source4/scripting/bin/samba-tool user show \
|
||||
sambatool1 --attributes=displayName \
|
||||
-H "ldap://$SERVER" "-U$USERNAME" "--password=$PASSWORD"
|
||||
}
|
||||
|
||||
# Test edit user - change base64 attribute value including control character
|
||||
change_attribute_base64_control() {
|
||||
@ -163,6 +169,7 @@ testit "add_attribute_base64_control" add_attribute_base64_control || failed=`ex
|
||||
testit_grep "get_attribute_base64_control" "^displayName:: $display_name_con_b64" get_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit "change_attribute_base64_control" change_attribute_base64_control || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_base64" "^displayName:: $display_name_b64" get_attribute_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_attribute_force_no_base64" "^displayName: $display_name" get_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "change_attribute_force_no_base64" change_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit_grep "get_changed_attribute_force_no_base64" "^displayName: $display_name_new" get_changed_attribute_force_no_base64 || failed=`expr $failed + 1`
|
||||
testit "delete_user" delete_user || failed=`expr $failed + 1`
|
||||
|
Loading…
x
Reference in New Issue
Block a user