summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-03-13 14:36:58 +0100
committerAndreas Schneider <asn@cryptomilk.org>2023-04-06 13:45:35 +0000
commitb6cf609e9fd618eac7af88522fd02709123de2a0 (patch)
tree2d695aed056f58b04d42dd927ca8ed7cc5ad50c2
parentaa2ece8f64952707d18d489ca486977f5ef7939b (diff)
downloadsamba-b6cf609e9fd618eac7af88522fd02709123de2a0.tar.gz
nsswitch:tests: Use configuration variable passed to test_rfc2307_mapping.sh
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15336 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rwxr-xr-xnsswitch/tests/test_rfc2307_mapping.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/nsswitch/tests/test_rfc2307_mapping.sh b/nsswitch/tests/test_rfc2307_mapping.sh
index 66ee865f8eb..a700791bde3 100755
--- a/nsswitch/tests/test_rfc2307_mapping.sh
+++ b/nsswitch/tests/test_rfc2307_mapping.sh
@@ -1,8 +1,8 @@
#!/bin/sh
# Blackbox test for wbinfo and rfc2307 mappings
-if [ $# -lt 4 ]; then
+if [ $# -lt 7 ]; then
cat <<EOF
-Usage: test_rfc2307_mapping.sh DOMAIN USERNAME PASSWORD SERVER UID_RFC2307TEST GID_RFC2307TEST
+Usage: test_rfc2307_mapping.sh DOMAIN USERNAME PASSWORD SERVER UID_RFC2307TEST GID_RFC2307TEST CONFIGURATION
EOF
exit 1
fi
@@ -13,6 +13,7 @@ PASSWORD=$3
SERVER=$4
UID_RFC2307TEST=$5
GID_RFC2307TEST=$6
+CONFIGURATION=${7}
shift 6
failed=0
@@ -61,11 +62,13 @@ knownfail()
# Create new testing account
testit "user add" $PYTHON $samba_tool user create --given-name="rfc2307" \
- --surname="Tester" --initial="UT" rfc2307_test_user testp@ssw0Rd "$@"
+ --surname="Tester" --initial="UT" rfc2307_test_user testp@ssw0Rd \
+ "${CONFIGURATION}" "$@"
#test creation of six different groups
-testit "group add" $PYTHON $samba_tool group add $CONFIG \
- --group-scope='Domain' --group-type='Security' rfc2307_test_group "$@"
+testit "group add" $PYTHON $samba_tool group add \
+ --group-scope='Domain' --group-type='Security' rfc2307_test_group \
+ "${CONFIGURATION}" "$@"
# Create new testing group
@@ -184,7 +187,7 @@ else
echo "success: wbinfo -Y check for sane mapping"
fi
-testit "group delete" $PYTHON $samba_tool group delete rfc2307_test_group "$@"
-testit "user delete" $PYTHON $samba_tool user delete rfc2307_test_user "$@"
+testit "group delete" $PYTHON $samba_tool group delete rfc2307_test_group "${CONFIGURATION}" "$@"
+testit "user delete" $PYTHON $samba_tool user delete rfc2307_test_user "${CONFIGURATION}" "$@"
exit $failed