From 197883838f8ecb027e9d0375ff5238aec1567a42 Mon Sep 17 00:00:00 2001 From: Tim Beale Date: Fri, 6 Oct 2017 16:30:40 +1300 Subject: [PATCH] selftest: Add basic test for schema upgrade This tests that we can provision using both the 2008 and 2012 schema, that we can upgrade a 2008 Samba instance to use the 2012 schema, and that when we do that the result (more or less) matches a straight 2012 provision. Signed-off-by: Tim Beale Reviewed-by: Garming Sam Reviewed-by: Andrew Bartlett --- selftest/tests.py | 5 ++ testprogs/blackbox/schemaupgrade.sh | 80 +++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100755 testprogs/blackbox/schemaupgrade.sh diff --git a/selftest/tests.py b/selftest/tests.py index e65d63d8c6a..713e9d3fbcd 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -131,6 +131,11 @@ plantestsuite( ["PYTHON=%s" % python, os.path.join(bbdir, "runtime-links.sh"), '$PREFIX_ABS/provision', 'release-4-5-0-pre1', configuration]) +plantestsuite( + "samba4.blackbox.schemaupgrade", "none", + ["PYTHON=%s" % python, + os.path.join(bbdir, "schemaupgrade.sh"), + '$PREFIX_ABS/provision', configuration]) planpythontestsuite("none", "samba.tests.upgradeprovision") planpythontestsuite("none", "samba.tests.xattr", py3_compatible=True) planpythontestsuite("none", "samba.tests.ntacls") diff --git a/testprogs/blackbox/schemaupgrade.sh b/testprogs/blackbox/schemaupgrade.sh new file mode 100755 index 00000000000..d79915a78fe --- /dev/null +++ b/testprogs/blackbox/schemaupgrade.sh @@ -0,0 +1,80 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then +cat <