summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-09-13 21:02:43 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-13 16:30:31 +0200
commitc6cf070df0add8484ffb16b40893327b36b6a936 (patch)
treee411481e1305cb1c5bcab0a1ee0a49138214c1e1 /source4/setup
parent4e87a8419ca662d35018f0d00c80f3d816473cbc (diff)
downloadsamba-c6cf070df0add8484ffb16b40893327b36b6a936.tar.gz
samba-c6cf070df0add8484ffb16b40893327b36b6a936.tar.bz2
samba-c6cf070df0add8484ffb16b40893327b36b6a936.zip
s4-s3-upgrade Improve samba-tool domain samba3upgrade behaviour
The --realm argument is again optional (the previous code would take the default from the default smb.conf, not the one specified) and --targetdir is now a named argument much like it is to provision. We now test the --testparm option to ensure it behaves the way we expect. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Sep 13 16:30:31 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/tests/blackbox_s3upgrade.sh29
1 files changed, 25 insertions, 4 deletions
diff --git a/source4/setup/tests/blackbox_s3upgrade.sh b/source4/setup/tests/blackbox_s3upgrade.sh
index 44da3234bf..a4c4b79669 100755
--- a/source4/setup/tests/blackbox_s3upgrade.sh
+++ b/source4/setup/tests/blackbox_s3upgrade.sh
@@ -12,12 +12,12 @@ shift 1
samba4bindir="$BINDIR"
samba_tool="$samba4bindir/samba-tool$EXEEXT"
+testparm="$samba4bindir/testparm$EXEEXT"
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
rm -rf $PREFIX/samba3-upgrade
-mkdir -p $PREFIX/samba3-upgrade/s4_1
-mkdir -p $PREFIX/samba3-upgrade/s4_2
+mkdir -p $PREFIX/samba3-upgrade
cp -a $SRCDIR/testdata/samba3 $PREFIX/samba3-upgrade
# Test 1 (s3 member)
@@ -38,7 +38,7 @@ cat - > $PREFIX/samba3-upgrade/samba3/smb1.conf <<EOF
debug level = 0
EOF
-testit "samba3-upgrade-member" $samba_tool domain samba3upgrade $PREFIX/samba3-upgrade/samba3/smb1.conf $PREFIX/samba3-upgrade/s4_1 --libdir=$PREFIX/samba3-upgrade/samba3
+testit "samba3-upgrade-member" $samba_tool domain samba3upgrade $PREFIX/samba3-upgrade/samba3/smb1.conf --targetdir=$PREFIX/samba3-upgrade/s4_1 --libdir=$PREFIX/samba3-upgrade/samba3
# Test 2 (s3 dc)
cat - > $PREFIX/samba3-upgrade/samba3/smb2.conf <<EOF
@@ -59,7 +59,28 @@ cat - > $PREFIX/samba3-upgrade/samba3/smb2.conf <<EOF
domain logons = yes
EOF
-testit "samba3-upgrade-dc" $samba_tool domain samba3upgrade $PREFIX/samba3-upgrade/samba3/smb2.conf $PREFIX/samba3-upgrade/s4_2 --libdir=$PREFIX/samba3-upgrade/samba3
+testit "samba3-upgrade-dc" $samba_tool domain samba3upgrade $PREFIX/samba3-upgrade/samba3/smb2.conf --targetdir=$PREFIX/samba3-upgrade/s4_2 --libdir=$PREFIX/samba3-upgrade/samba3
+
+# Test 3 (s3 dc using testparm hook)
+cat - > $PREFIX/samba3-upgrade/samba3/smb3.conf <<EOF
+[global]
+ workgroup = SAMBA
+ netbiosname = S3UPGRADE
+ security = user
+ realm = s3.samba.example.com
+ passdb backend = tdbsam:$PREFIX/samba3-upgrade/samba3/passdb.tdb
+ private dir = $PREFIX/samba3-upgrade/samba3
+ lock directory = $PREFIX/samba3-upgrade/samba3
+ state directory = $PREFIX/samba3-upgrade/samba3
+ cache directory = $PREFIX/samba3-upgrade/samba3
+ pid directory = $PREFIX/samba3-upgrade/samba3
+ usershare path = $PREFIX/samba3-upgrade/samba3
+ ncalrpc dir = $PREFIX/samba3-upgrade/samba3
+ debug level = 0
+ domain logons = yes
+EOF
+
+testit "samba3-upgrade-testparm" $samba_tool domain samba3upgrade $PREFIX/samba3-upgrade/samba3/smb2.conf --targetdir=$PREFIX/samba3-upgrade/s4_3 --testparm=$testparm
rm -rf $PREFIX/samba3-upgrade