summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-06-19 11:05:20 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-06-19 11:05:20 +1000
commit9ea25cacf1c564a485897432b73beebf2e634f55 (patch)
tree346c3d17e9952855032c48b66be7cb1ba1e29bb7 /source4/setup
parent221b69af846c876957ed3f8bab23e2f51574eb87 (diff)
downloadsamba-9ea25cacf1c564a485897432b73beebf2e634f55.tar.gz
samba-9ea25cacf1c564a485897432b73beebf2e634f55.tar.bz2
samba-9ea25cacf1c564a485897432b73beebf2e634f55.zip
Add a blackbox test for the provision-backend script.
This test (as most tests do :-) found a few bugs, also fixed in this commit. Andrew Bartlett (This used to be commit d96a6482dad54d1d27a87107865e833a9c32cf53)
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/tests/blackbox_provision-backend.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/setup/tests/blackbox_provision-backend.sh b/source4/setup/tests/blackbox_provision-backend.sh
new file mode 100755
index 0000000000..312ca5c70e
--- /dev/null
+++ b/source4/setup/tests/blackbox_provision-backend.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: blackbox_provision.sh PREFIX
+EOF
+exit 1;
+fi
+
+PREFIX="$1"
+shift 1
+
+. `dirname $0`/../../../testprogs/blackbox/subunit.sh
+
+testit "openldap-backend" $PYTHON ./setup/provision-backend --domain=FOO --realm=foo.example.com --host-name=samba --ldap-backend-type=openldap --targetdir=$PREFIX/openldap-backend
+testit "fedora-ds-backend" $PYTHON ./setup/provision-backend --domain=FOO --realm=foo.example.com --host-name=samba --ldap-backend-type=fedora-ds --targetdir=$PREFIX/fedora-ds-backend
+
+reprovision() {
+ $PYTHON ./setup/provision-backend --domain=FOO --realm=foo.example.com --host-name=samba --ldap-backend-type=openldap --targetdir=$PREFIX/openldap-backend-reprovision
+ $PYTHON ./setup/provision-backend --domain=FOO --realm=foo.example.com --host-name=samba --ldap-backend-type=openldap --targetdir=$PREFIX/openldap-backend-reprovision
+}
+
+testit "reprovision-backend" reprovision
+
+exit $failed