ctdb-daemon: Consolidate basic CTDB context initialisation
[samba.git] / testprogs / blackbox / test_samba_upgradedns.sh
1 #!/bin/sh
2 # Blackbox tests for the samba_upgradedns
3 # Copyright (C) 2006-2007 Jelmer Vernooij <jelmer@samba.org>
4 # Copyright (C) 2006-2012 Andrew Bartlett <abartlet@samba.org>
5
6 if [ $# -lt 4 ]; then
7 cat <<EOF
8 Usage: test_samba_upgradedns.sh SERVER REALM PREFIX PROVDIR
9 EOF
10 exit 1;
11 fi
12
13 SERVER=$1
14 REALM=$2
15 PREFIX=$3
16 PROVDIR=$4
17 shift 4
18 failed=0
19
20 samba4bindir="$BINDIR"
21 samba4srcdir="$SRCDIR/source4"
22 samba4kinit=kinit
23 if test -x $BINDIR/samba4kinit; then
24         samba4kinit=$BINDIR/samba4kinit
25 fi
26
27
28 . `dirname $0`/subunit.sh
29
30 testit "run samba_upgradedns converting to bind9 DLZ" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
31
32 testit "run samba_upgradedns converting to internal" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
33
34 testit "run samba_upgradedns converting to internal (2nd time)" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
35
36 testit "run samba_upgradedns converting to bind9 DLZ (2nd time)" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
37
38 testit "run samba_upgradedns converting to bind9 DLZ (3rd time)" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
39
40
41 exit $failed