smbd: Fix a typo in a few places
[samba.git] / source3 / script / tests / test_registry_share.sh
1 #!/bin/sh
2 # Blackbox tests for registry shares
3 #
4
5 if [ $# -lt 3 ]; then
6         cat <<EOF
7 Usage: test_registry_share.sh SERVER USERNAME PASSWORD
8 EOF
9         exit 1
10 fi
11
12 SERVER=$1
13 USERNAME=$2
14 PASSWORD=$3
15 shift 3
16 failed=0
17
18 samba_bindir="$BINDIR"
19 samba_srcdir="$SRCDIR"
20 smbclient="$samba_bindir/smbclient"
21 rpcclient="$samba_bindir/rpcclient"
22
23 . $samba_srcdir/testprogs/blackbox/subunit.sh
24 . $samba_srcdir/testprogs/blackbox/common_test_fns.inc
25
26 test_smbclient \
27         "Test access to registry share [${USERNAME}]" \
28         "ls" "//${SERVER}/registry_share" "-U$USERNAME%$PASSWORD" ||
29         failed=$((failed + 1))
30
31 testit_grep_count \
32         "Test for share enum with registry share" \
33         "netname: registry_share" \
34         1 \
35         ${rpcclient} "ncacn_np:${SERVER}" "-U$USERNAME%$PASSWORD" \
36         -c netshareenum ||
37         failed=$((failed + 1))
38
39 testok "$0" "$failed"