>From 76529d437a967ccc2255ed2c226eb0082225c9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Tue, 18 Feb 2014 13:34:32 +0100 Subject: [PATCH 1/4] tests: add confdb_path to sss_test_ctx Reviewed-by: Jakub Hrozek --- src/tests/common.h | 1 + src/tests/common_dom.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tests/common.h b/src/tests/common.h index ba3b3a7490ec5bd0e75c5f2f66c39542ca0c37ee..7cdecb92a937ff8899ab98c1c1fe8b8dfc7ca1a0 100644 --- a/src/tests/common.h +++ b/src/tests/common.h @@ -62,6 +62,7 @@ struct sss_test_ctx { struct confdb_ctx *confdb; struct tevent_context *ev; struct sss_domain_info *dom; + char *confdb_path; bool done; int error; diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c index c0b44456c819501b500ed87ffb3a6e089ef3b2dd..42bf358a3e13e9102fde0134762a76038dc3fcff 100644 --- a/src/tests/common_dom.c +++ b/src/tests/common_dom.c @@ -35,7 +35,6 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx, struct sss_test_conf_param *params) { struct sss_test_ctx *test_ctx; - char *conf_db; size_t i; const char *val[2]; val[1] = NULL; @@ -48,14 +47,15 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx, goto fail; } - conf_db = talloc_asprintf(test_ctx, "%s/%s", tests_path, confdb_path); - if (conf_db == NULL) { + test_ctx->confdb_path = talloc_asprintf(test_ctx, "%s/%s", + tests_path, confdb_path); + if (test_ctx->confdb_path == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "talloc_asprintf failed\n"); goto fail; } /* Connect to the conf db */ - ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db); + ret = confdb_init(test_ctx, &test_ctx->confdb, test_ctx->confdb_path); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "confdb_init failed: %d\n", ret); goto fail; -- 1.9.0