mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
vfs_offline: add a blackbox test
Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
b37ecbd06d
commit
b3f3ffe35d
@ -594,6 +594,9 @@ sub setup_fileserver($$)
|
||||
my $valid_users_sharedir="$share_dir/valid_users";
|
||||
push(@dirs,$valid_users_sharedir);
|
||||
|
||||
my $offline_sharedir="$share_dir/offline";
|
||||
push(@dirs,$offline_sharedir);
|
||||
|
||||
my $fileserver_options = "
|
||||
[lowercase]
|
||||
path = $lower_case_share_dir
|
||||
@ -616,6 +619,9 @@ sub setup_fileserver($$)
|
||||
[valid-users-access]
|
||||
path = $valid_users_sharedir
|
||||
valid users = +userdup
|
||||
[offline]
|
||||
path = $offline_sharedir
|
||||
vfs objects = offline
|
||||
";
|
||||
|
||||
my $vars = $self->provision($path,
|
||||
|
33
source3/script/tests/test_offline.sh
Executable file
33
source3/script/tests/test_offline.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Blackbox test for shadow_copy2 VFS.
|
||||
#
|
||||
if [ $# -lt 7 ]; then
|
||||
cat <<EOF
|
||||
Usage: test_offline SERVER SERVER_IP DOMAIN USERNAME PASSWORD WORKDIR SMBCLIENT
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
SERVER=${1}
|
||||
SERVER_IP=${2}
|
||||
DOMAIN=${3}
|
||||
USERNAME=${4}
|
||||
PASSWORD=${5}
|
||||
WORKDIR=${6}
|
||||
SMBCLIENT=${7}
|
||||
shift 7
|
||||
SMBCLIENT="$VALGRIND ${SMBCLIENT}"
|
||||
ADDARGS="$*"
|
||||
|
||||
incdir=`dirname $0`/../../../testprogs/blackbox
|
||||
. $incdir/subunit.sh
|
||||
|
||||
touch $WORKDIR/foo
|
||||
|
||||
failed=0
|
||||
|
||||
attribs=`$SMBCLIENT -U$USERNAME%$PASSWORD "//$SERVER/offline" -I $SERVER_IP -c "allinfo foo" | sed -n 's/^attributes:.*(\([^)]*\)).*/\1/p'`
|
||||
testit "file has offline attribute" test "x$attribs" = "x1000" || failed=`expr $failed + 1`
|
||||
|
||||
exit $failed
|
@ -178,6 +178,7 @@ for env in ["fileserver"]:
|
||||
plantestsuite("samba3.blackbox.preserve_case (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
|
||||
plantestsuite("samba3.blackbox.dfree_command (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
|
||||
plantestsuite("samba3.blackbox.valid_users (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_valid_users.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
|
||||
plantestsuite("samba3.blackbox.offline (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_offline.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/offline', smbclient3])
|
||||
|
||||
#
|
||||
# tar command tests
|
||||
|
Loading…
x
Reference in New Issue
Block a user