summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-26 15:34:53 +1100
committerAndrew Tridgell <tridge@samba.org>2009-11-27 16:05:05 +1100
commit6f0f82f7ed9cd351b325d4ae275184b67c4b751b (patch)
treedc8ee868929b0839f5169d22aaf0bbd923d94f97 /source4
parentb9f95882f0fd9f453c6b90d1ca023111195d757b (diff)
downloadsamba-6f0f82f7ed9cd351b325d4ae275184b67c4b751b.tar.gz
samba-6f0f82f7ed9cd351b325d4ae275184b67c4b751b.tar.bz2
samba-6f0f82f7ed9cd351b325d4ae275184b67c4b751b.zip
s4:selftest Add tests for upgradeprovision
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/selftest/tests.sh1
-rwxr-xr-xsource4/setup/tests/blackbox_upgradeprovision.sh26
2 files changed, 27 insertions, 0 deletions
diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index 8888637b89..724c9f2b9b 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -470,5 +470,6 @@ rm -rf $PREFIX/provision
mkdir $PREFIX/provision
plantest "blackbox.provision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision.sh "$PREFIX/provision"
plantest "blackbox.provision-backend.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision-backend.sh "$PREFIX/provision"
+plantest "blackbox.upgradeprovision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_upgradeprovision.sh "$PREFIX/provision"
plantest "blackbox.setpassword.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_setpassword.sh "$PREFIX/provision"
plantest "blackbox.newuser.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_newuser.sh "$PREFIX/provision"
diff --git a/source4/setup/tests/blackbox_upgradeprovision.sh b/source4/setup/tests/blackbox_upgradeprovision.sh
new file mode 100755
index 0000000000..e5176e6005
--- /dev/null
+++ b/source4/setup/tests/blackbox_upgradeprovision.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: blackbox_upgradeprovision.sh PREFIX
+EOF
+exit 1;
+fi
+
+PREFIX="$1"
+shift 1
+
+. `dirname $0`/../../../testprogs/blackbox/subunit.sh
+
+upgradeprovision() {
+ $PYTHON ./setup/provision --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision" --server-role="dc"
+ $PYTHON ./scripting/bin/upgradeprovision --targetdir="$PREFIX/upgradeprovision"
+}
+
+upgradeprovision_full() {
+ $PYTHON ./setup/provision --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc"
+ $PYTHON ./scripting/bin/upgradeprovision --targetdir="$PREFIX/upgradeprovision_full" --full
+}
+
+testit "upgradeprovision" upgradeprovision
+testit "upgradeprovision_full" upgradeprovision_full