ctdb-server: Remove duplicate logic
[samba4-gss.git] / source4 / utils / tests / test_smbclient.sh
blob9b3e8dc76b67bba87bddfd457932868e97c598d3
1 #!/bin/sh
2 # Blackbox tests for smbclient
4 SERVER=$1
5 SERVER_IP=$2
6 USERNAME=$3
7 PASSWORD=$4
8 DOMAIN=$5
9 smbclient=$6
10 shift 6
12 failed=0
14 testit()
16 name="$1"
17 shift
18 cmdline="$*"
19 echo "test: $name"
20 $cmdline
21 status=$?
22 if [ x$status = x0 ]; then
23 echo "success: $name"
24 else
25 echo "failure: $name"
26 failed=$(expr $failed + 1)
28 return $status
31 testit "Test login with --machine-pass without kerberos" $VALGRIND $smbclient -c 'ls' $CONFIGURATION //$SERVER/tmp --machine-pass --use-kerberos=disabled
33 testit "Test login with --machine-pass and kerberos" $VALGRIND $smbclient -c 'ls' $CONFIGURATION //$SERVER/tmp --machine-pass --use-kerberos=required
35 exit $failed