summaryrefslogtreecommitdiff
path: root/testprogs/blackbox
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-05-20 23:50:55 +0400
committerMatthieu Patou <mat@samba.org>2011-05-21 09:50:34 +0200
commit49c99d05159fb601ea076824e0f6a64326fdf8d9 (patch)
treedc9b9d9ec016fe78022caef8a55b9db260b1187a /testprogs/blackbox
parentf1873382da63d2344909395d6fa0c1ed9ffa961d (diff)
downloadsamba-49c99d05159fb601ea076824e0f6a64326fdf8d9.tar.gz
samba-49c99d05159fb601ea076824e0f6a64326fdf8d9.tar.bz2
samba-49c99d05159fb601ea076824e0f6a64326fdf8d9.zip
s4: add blackbox test for rename
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sat May 21 09:50:34 CEST 2011 on sn-devel-104
Diffstat (limited to 'testprogs/blackbox')
-rwxr-xr-xtestprogs/blackbox/renamedc.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/testprogs/blackbox/renamedc.sh b/testprogs/blackbox/renamedc.sh
new file mode 100755
index 0000000000..d0615b319c
--- /dev/null
+++ b/testprogs/blackbox/renamedc.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: blackbox_upgradeprovision.sh PREFIX
+EOF
+exit 1;
+fi
+
+PREFIX="$1"
+shift 1
+
+. `dirname $0`/subunit.sh
+
+if [ ! -d $PREFIX/upgradeprovision_full ]; then
+ $PYTHON $SRCDIR/source4/setup/provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc"
+fi
+
+
+testrenamedc() {
+ $PYTHON $SRCDIR/source4/scripting/bin/renamedc \
+ --oldname="BAR" \
+ --newname="RAYMONBAR" \
+ -s $PREFIX/upgradeprovision_full/etc/smb.conf
+}
+
+
+testrenamedc2() {
+ $PYTHON $SRCDIR/source4/scripting/bin/renamedc \
+ --oldname="RAYMONBAR" \
+ --newname="BAR" \
+ -s $PREFIX/upgradeprovision_full/etc/smb.conf
+}
+
+testit "renamedc" testrenamedc
+testit "renamedc2" testrenamedc2
+
+if [ $failed -eq 0 ]; then
+ rm -rf $PREFIX/upgradeprovision_full
+fi
+
+exit $failed