From 1c818d6927549a1e0f18ea9a9810dc6de97d5cd1 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Tue, 29 Oct 2013 12:08:57 +0100 Subject: 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 Reviewed-by: Jim McDonough Autobuild-User(master): Jim McDonough Autobuild-Date(master): Tue Nov 5 16:40:20 CET 2013 on sn-devel-104 --- source3/script/tests/test_smbclient_tarmode.pl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source3/script') 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"; -- cgit