source: trunk/server/source4/setup/tests/blackbox_spn.sh

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 1.1 KB
Line 
1#!/bin/sh
2
3if [ $# -lt 1 ]; then
4cat <<EOF
5Usage: blackbox_group.sh PREFIX
6EOF
7exit 1;
8fi
9
10PREFIX="$1"
11shift 1
12
13. `dirname $0`/../../../testprogs/blackbox/subunit.sh
14
15
16samba_tool="./bin/samba-tool"
17
18CONFIG="--configfile=$PREFIX/etc/smb.conf"
19
20#creation of two test subjects
21testit "addspn" $samba_tool spn add FOO/bar Administrator $CONFIG
22testit "delspn" $samba_tool spn delete FOO/bar $CONFIG
23testit "readdspn" $samba_tool spn add FOO/bar Administrator $CONFIG
24testit_expect_failure "failexistingspn" $samba_tool spn add FOO/bar Guest $CONFIG
25testit "existingspnforce" $samba_tool spn add --force FOO/bar Guest $CONFIG
26testit_expect_failure "faildelspnnotgooduser" $samba_tool spn delete FOO/bar krbtgt $CONFIG
27testit_expect_failure "faildelspnmoreoneuser" $samba_tool spn delete FOO/bar $CONFIG
28testit "deluserspn" $samba_tool spn delete FOO/bar Guest $CONFIG
29testit "dellastuserspn" $samba_tool spn delete FOO/bar $CONFIG
30testit_expect_failure "faildelspn" $samba_tool spn delete FOO/bar $CONFIG
31testit_expect_failure "failaddspn" $samba_tool spn add FOO/bar nonexistinguser $CONFIG
32
33exit $failed
Note: See TracBrowser for help on using the repository browser.