summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2014-09-24 13:35:29 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-10-20 16:14:58 +0200
commit9f734d4c122e37cc3080974342ed9586d05d5f83 (patch)
treeceeee841789ab4efc0d77e00960f8863f2c45457 /src/tests
parentc9589c42bcdcc864c6becda3e6c04b890ee81b0c (diff)
downloadsssd-9f734d4c122e37cc3080974342ed9586d05d5f83.tar.gz
sssd-9f734d4c122e37cc3080974342ed9586d05d5f83.tar.xz
sssd-9f734d4c122e37cc3080974342ed9586d05d5f83.zip
sysdb: add view data to domains
The information about view is read from the cache and added to the domain structs accordingly. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/cmocka/test_responder_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/cmocka/test_responder_common.c b/src/tests/cmocka/test_responder_common.c
index 77437602b..a6f642ab2 100644
--- a/src/tests/cmocka/test_responder_common.c
+++ b/src/tests/cmocka/test_responder_common.c
@@ -87,6 +87,7 @@ struct parse_inp_test_ctx {
void parse_inp_test_setup(void **state)
{
struct parse_inp_test_ctx *parse_inp_ctx;
+ int ret;
assert_true(leak_check_setup());
parse_inp_ctx = talloc_zero(global_talloc_context, struct parse_inp_test_ctx);
@@ -106,6 +107,12 @@ void parse_inp_test_setup(void **state)
/* Testing the request race condition should be a special case */
gettimeofday(&parse_inp_ctx->rctx->get_domains_last_call, NULL);
+ /* sysdb_master_domain_update sets the view name, if we do not call it
+ * here we get a leak check warning when sysdb_master_domain_update is
+ * called later while processing the tests. */
+ ret = sysdb_master_domain_update(parse_inp_ctx->tctx->dom);
+ assert_int_equal(ret, EOK);
+
check_leaks_push(parse_inp_ctx);
*state = parse_inp_ctx;
}