diff options
author | Garming Sam <garming@catalyst.net.nz> | 2016-10-21 11:40:51 +1300 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-11-30 12:19:32 +0100 |
commit | b5d5d85d5160ac82b24d73e7cd1e757c0bfd7835 (patch) | |
tree | 97f9fe3e2a9ee1c437baf2bf2cd87e3653eda116 /testprogs/blackbox/tombstones-expunge.sh | |
parent | d83c6b3357d2230a4a8a315018e0b40560684392 (diff) | |
download | samba-b5d5d85d5160ac82b24d73e7cd1e757c0bfd7835.tar.gz |
tombstones-expunge: Add a test for deleting links to recycled objects
Currently this fails because we rely on a GUID DN, which fails to
resolve in the case that the GUID no longer exists in the database (i.e.
when that object has been purged after 6 months).
The tests use a made up extended DN built from fred where the GUID has
been tweaked.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12385
(cherry picked from commit dba624364cde1c885640386c4e2bca17e9d5297c)
Diffstat (limited to 'testprogs/blackbox/tombstones-expunge.sh')
-rwxr-xr-x | testprogs/blackbox/tombstones-expunge.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testprogs/blackbox/tombstones-expunge.sh b/testprogs/blackbox/tombstones-expunge.sh index 49a50730330..33cb0b1be13 100755 --- a/testprogs/blackbox/tombstones-expunge.sh +++ b/testprogs/blackbox/tombstones-expunge.sh @@ -68,6 +68,14 @@ tombstones_expunge() { fi } +add_dangling_link() { + ldif=$release_dir/add-dangling-link.ldif + TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb $ldif + if [ "$?" != "0" ]; then + return 1 + fi +} + add_two_more_users() { ldif=$release_dir/add-two-more-users.ldif TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif @@ -172,6 +180,7 @@ if [ -d $release_dir ]; then testit $RELEASE undump testit "add_two_more_users" add_two_more_users testit "add_four_more_links" add_four_more_links + testit "add_dangling_link" add_dangling_link testit "remove_one_link" remove_one_link testit "remove_one_user" remove_one_user testit "check_match_rule_links" check_match_rule_links |