13 . `dirname $0`/subunit.sh
15 RELEASE="release-4-8-0-pre1"
16 release_dir=`dirname $0`/../../source4/selftest/provisions/$RELEASE
18 cleanup_output_directories()
20 if [ -d $PREFIX_ABS/2012R2_schema ]; then
21 rm -fr $PREFIX_ABS/2012R2_schema
24 if [ -d $PREFIX_ABS/$RELEASE ]; then
25 rm -fr $PREFIX_ABS/$RELEASE
30 if test -x $BINDIR/tdbrestore;
32 `dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE $BINDIR/tdbrestore
34 `dirname $0`/../../source4/selftest/provisions/undump.sh $release_dir $PREFIX_ABS/$RELEASE
38 PROVISION_OPTS="--use-ntvfs --host-ip6=::1 --host-ip=127.0.0.1"
41 $PYTHON $BINDIR/samba-tool domain provision $PROVISION_OPTS --domain=REALM --realm=REALM.COM --targetdir=$PREFIX_ABS/2012R2_schema --base-schema=2012_R2 --host-name=FLPREP
45 # At some point we will need to ignore, but right now, it should be perfect
47 $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/$2/private/sam.ldb tdb://$PREFIX_ABS/$3/private/sam.ldb --two
51 # Our functional prep doesn't set these values as they were not provided
52 # These are XML schema based enumerations which are used for claims
53 ldapcmp_ignore "msDS-ClaimPossibleValues" "$RELEASE" "2012R2_schema"
57 $BINDIR/samba-tool domain functionalprep -H tdb://$PREFIX_ABS/2012R2_schema/private/sam.ldb --function-level=2012_R2
60 # double-check we cleaned up from the last test run
61 cleanup_output_directories
63 testit $RELEASE undump
65 # Provision a DC based on 2012R2 schema
66 testit "provision_2012R2_schema" provision_2012r2
68 # Perform functional prep up to 2012 R2 level
69 testit "functional_prep" functional_prep
71 # check that the databases are now the same
72 testit "check_databases_same" ldapcmp
74 cleanup_output_directories