15 . $
(dirname $0)/subunit.sh
16 . $
(dirname $0)/common_test_fns.inc
18 OLD_RELEASE
="release-4-5-0-pre1"
19 old_release_dir
="$SRCDIR_ABS/source4/selftest/provisions/$OLD_RELEASE"
21 samba_tdbrestore
=$
(system_or_builddir_binary tdbrestore
"${BINDIR}")
23 samba_undump
="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
24 if [ ! -x "${samba_undump}" ]; then
25 subunit_start_test
"special group"
26 subunit_skip_test
"special group" <<EOF
27 Skipping tests - undump.sh is not available in release tarballs
32 cleanup_output_directories
()
34 remove_directory
$PREFIX_ABS/$OLD_RELEASE
39 $samba_undump $old_release_dir $PREFIX_ABS/$OLD_RELEASE $samba_tdbrestore
44 $PYTHON $BINDIR/samba-tool group add
'protected users' --special -H tdb
://$PREFIX_ABS/$OLD_RELEASE/private
/sam.ldb
47 # double-check we cleaned up from the last test run
48 cleanup_output_directories
50 testit
$OLD_RELEASE undump_old || failed
=$
(expr $failed + 1)
52 testit
"add_special_group" add_special_group || failed
=$
(expr $failed + 1)
54 testit_expect_failure_grep
"add_duplicate_special_group" "Failed to add group.*already exists" add_special_group || failed
=$
(expr $failed + 1)
56 cleanup_output_directories