s4:rpc_server: remove unused dcesrv_connection_context->private_date
[samba.git] / testprogs / blackbox / runtime-links.sh
1 #!/bin/sh
2
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: dbcheck-links.sh PREFIX RELEASE
6 EOF
7 exit 1;
8 fi
9
10 PREFIX_ABS="$1"
11 RELEASE="$2"
12 shift 2
13
14 . `dirname $0`/subunit.sh
15
16 . `dirname $0`/common-links.sh
17
18 delete_member_of_deleted_group() {
19     TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 'CN=User1 UT. Tester,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp'
20     if [ "$?" != "0" ]; then
21         return 1
22     fi
23 }
24
25 delete_backlink_memberof_deleted_group() {
26     TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 'CN=User UT. Tester,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp'
27     if [ "$?" != "0" ]; then
28         return 1
29     fi
30 }
31
32 delete_dangling_backlink_memberof_group() {
33     TZ=UTC $ldbdel -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 'CN=dangling-back,CN=Users,DC=release-4-5-0-pre1,DC=samba,DC=corp'
34     if [ "$?" != "0" ]; then
35         return 1
36     fi
37 }
38
39
40 if [ -d $release_dir ]; then
41     testit $RELEASE undump
42     testit "add_dangling_link" add_dangling_link
43     testit "add_dangling_backlink" add_dangling_backlink
44     testit "add_deleted_dangling_backlink" add_deleted_dangling_backlink
45     testit "revive_links_on_deleted_group" revive_links_on_deleted_group
46     testit "revive_backlink_on_deleted_group" revive_backlink_on_deleted_group
47     testit "add_deleted_target_link" add_deleted_target_link
48     testit "add_deleted_target_backlink" add_deleted_target_backlink
49     testit "dangling_one_way_link" dangling_one_way_link
50     testit "dangling_one_way_dn" dangling_one_way_dn
51     testit "deleted_one_way_dn" deleted_one_way_dn
52     testit "add_dangling_multi_valued" add_dangling_multi_valued
53
54 #Now things are set up, work with the DB
55     testit "delete_member_of_deleted_group" delete_member_of_deleted_group
56     testit "delete_backlink_memberof_deleted_group" delete_backlink_memberof_deleted_group
57     testit "delete_dangling_backlink_memberof_group" delete_dangling_backlink_memberof_group
58 else
59     subunit_start_test $RELEASE
60     subunit_skip_test $RELEASE <<EOF
61 no test provision
62 EOF
63
64     subunit_start_test "tombstones_expunge"
65     subunit_skip_test "tombstones_expunge" <<EOF
66 no test provision
67 EOF
68 fi
69
70 if [ -d $PREFIX_ABS/${RELEASE} ]; then
71     rm -fr $PREFIX_ABS/${RELEASE}
72 fi
73
74 exit $failed