s4:kdc/db-glue: allow principals in form of computer@EXAMPLE.COM
[Samba.git] / source3 / script / tests / test_net_misc.sh
blob566694be74b58fcd76732d55b03769b747391e53
1 #!/bin/sh
3 # various tests for the "net" command
5 if [ $# -lt 3 ]; then
6 cat <<EOF
7 Usage: test_net_misc.sh SCRIPTDIR SERVERCONFFILE NET CONFIGURATION
8 EOF
9 exit 1;
12 SCRIPTDIR="$1"
13 SERVERCONFFILE="$2"
14 NET="$3"
15 CONFIGURATION="$4"
17 NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
19 NETTIME="${NET} time"
20 NETLOOKUP="${NET} lookup"
22 incdir=`dirname $0`/../../../testprogs/blackbox
23 . $incdir/subunit.sh
25 failed=0
27 test_time()
29 PARAM="$1"
31 ${NETTIME} -S ${SERVER} ${PARAM}
34 test_lookup()
36 PARAM="$1"
38 ${NETLOOKUP} ${PARAM}
41 testit "get the time" \
42 test_time || \
43 failed=`expr $failed + 1`
45 testit "get the system time" \
46 test_time system || \
47 failed=`expr $failed + 1`
49 testit "get the time zone" \
50 test_time zone || \
51 failed=`expr $failed + 1`
53 testit "lookup the PDC" \
54 test_lookup pdc || \
55 failed=`expr $failed + 1`
57 testit "lookup the master browser" \
58 test_lookup master || \
59 failed=`expr $failed + 1`
61 testok $0 $failed