s3: Add msg_channel
[Samba/gebeck_regimport.git] / source4 / utils / tests / test_demote.sh
blob3d255ed91fdf5ec523584f2870bffd1c150da130
1 #!/bin/sh
2 # Blackbox tests for samba-tool
4 SERVER=$1
5 SERVER_IP=$2
6 USERNAME=$3
7 PASSWORD=$4
8 DOMAIN=$5
9 DC=$6
10 PROV=$7
11 shift 7
13 failed=0
15 samba4bindir="$BINDIR"
16 smbclient="$samba4bindir/smbclient"
17 samba_tool="$samba4bindir/samba-tool"
19 testit() {
20 name="$1"
21 shift
22 cmdline="$*"
23 echo "test: $name"
24 $cmdline
25 status=$?
26 if [ x$status = x0 ]; then
27 echo "success: $name"
28 else
29 echo "failure: $name"
30 failed=`expr $failed + 1`
32 return $status
36 testit "demote" $VALGRIND $samba_tool domain demote --server $DC -s $PROV/etc/smb.conf -W "$DOMAIN" -U"$USERNAME%$PASSWORD"
38 exit $failed