summaryrefslogtreecommitdiffstats
path: root/source3/script
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2013-10-29 12:08:57 +0100
committerJim McDonough <jmcd@samba.org>2013-11-05 16:40:20 +0100
commit1c818d6927549a1e0f18ea9a9810dc6de97d5cd1 (patch)
tree2330eb0db54352f3ab36348a7430ea21e4b627bd /source3/script
parent1424c61a1a42abd34d71b0b48ea56be4b7fe5a9c (diff)
downloadsamba-1c818d6927549a1e0f18ea9a9810dc6de97d5cd1.tar.gz
samba-1c818d6927549a1e0f18ea9a9810dc6de97d5cd1.tar.xz
samba-1c818d6927549a1e0f18ea9a9810dc6de97d5cd1.zip
test_smbclient_tarmode.pl: remove unneccesary arg defaults
The host, share and localpath arguments should not take default values. Check that these required arguments are specified. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): Jim McDonough <jmcd@samba.org> Autobuild-Date(master): Tue Nov 5 16:40:20 CET 2013 on sn-devel-104
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_smbclient_tarmode.pl15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl
index 26eab300d83..663f02f8a08 100755
--- a/source3/script/tests/test_smbclient_tarmode.pl
+++ b/source3/script/tests/test_smbclient_tarmode.pl
@@ -43,11 +43,11 @@ sub d {print Dumper @_;}
# 'our' to make them available in the File package
our $USER = '';
our $PW = '';
-our $HOST = 'localhost';
+our $HOST = '';
our $IP = '';
-our $SHARE = 'public';
+our $SHARE = '';
our $DIR = 'tar_test_dir';
-our $LOCALPATH = '/media/data/smb-test';
+our $LOCALPATH = '';
our $TMP = File::Temp->newdir();
our $BIN = 'smbclient';
our $SUBUNIT = 0;
@@ -101,13 +101,13 @@ my @TESTS = (
Environment:
-u, --user USER
-p, --password PW
- -n, --name HOST
+ -n, --name HOST (required)
-i, --ip IP
- -s, --share SHARE
+ -s, --share SHARE (required)
-d, --dir PATH
sub-path to use on the share
- -l, --local-path PATH
+ -l, --local-path PATH (required)
path to the root of the samba share on the machine.
-b, --bin BIN
@@ -155,6 +155,9 @@ GetOptions('u|user=s' => \$USER,
pod2usage(0) if $HELP;
pod2usage(-exitval => 0, -verbose => 2) if $MAN;
list_test(), exit 0 if $LIST_TEST;
+pod2usage(1) unless $HOST;
+pod2usage(1) unless $SHARE;
+pod2usage(1) unless $LOCALPATH;
if ($USER xor $PW) {
die "Need both user and password when one is provided\n";