diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-12 15:37:34 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-11-12 16:34:23 +1100 |
commit | 95a12cdf21ba86f460c2ffa51223e8564fd25014 (patch) | |
tree | c4535817f02d20897a767cde960b2b27494bc17e /source4 | |
parent | 693ddf5ba0d5e7a9fcc0f9727ff7f78b83d18343 (diff) | |
download | samba-95a12cdf21ba86f460c2ffa51223e8564fd25014.tar.gz samba-95a12cdf21ba86f460c2ffa51223e8564fd25014.tar.bz2 samba-95a12cdf21ba86f460c2ffa51223e8564fd25014.zip |
s4:torture Use (some) torture_assert() calls in RPC-DSSYNC test
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/dssync.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 705d060d3b..907474fc57 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -506,12 +506,9 @@ static bool test_analyse_objects(struct torture_context *tctx, if (ret != LDB_SUCCESS) { DEBUG(0, ("Could not re-fetch object just delivered over DRS: %s", ldb_errstring(ldb))); - return false; - } - if (res->count != 1) { - DEBUG(0, ("Could not re-fetch object just delivered over DRS")); - return false; + torture_assert_int_equal(tctx, ret, LDB_SUCCESS, "Could not re-fetch object just delivered over DRS"); } + torture_assert_int_equal(tctx, res->count, 1, "Could not re-fetch object just delivered over DRS"); ldap_msg = res->msgs[0]; for (j=0; j < ldap_msg->num_elements; j++) { ldap_msg->elements[j].flags = LDB_FLAG_MOD_ADD; @@ -562,6 +559,8 @@ static bool test_analyse_objects(struct torture_context *tctx, ldif.msg = new_msg; s = ldb_ldif_write_string(ldb, new_msg, &ldif); DEBUG(0, ("Difference in between DRS and LDAP objects: %s\n", s)); + talloc_free(search_req); + torture_assert_int_equal(tctx, new_msg->num_elements, 0, "Should have no objects in 'difference' message"); } talloc_free(search_req); } |