1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00
samba-mirror/source3/script/tests/test_substitutions.sh
Andreas Schneider 945e55c511 s3-selftest: Add a substituions testcase
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct  7 15:52:36 CEST 2016 on sn-devel-144
2016-10-07 15:52:36 +02:00

33 lines
634 B
Bash
Executable File

#!/bin/sh
# Blackbox tests for substitutions
#
# Copyright (c) 2016 Andreas Schneider <asn@samba.org>
if [ $# -lt 4 ]; then
cat <<EOF
Usage: test_substitutions.sh SERVER USERNAME PASSWORD PREFIX
EOF
exit 1;
fi
SERVER=$1
USERNAME=$2
PASSWORD=$3
PREFIX=$4
shift 4
failed=0
samba_bindir="$BINDIR"
samba_srcdir="$SRCDIR"
smbclient="$samba_bindir/smbclient"
. $samba_srcdir/testprogs/blackbox/subunit.sh
. $samba_srcdir/testprogs/blackbox/common_test_fns.inc
SMB_UNC="//$SERVER/subDUG"
test_smbclient "Test login to share with substitution" \
"ls" "$SMB_UNC" "-U$USERNAME%$PASSWORD" || failed=$(expr $failed + 1)
exit $failed