summaryrefslogtreecommitdiffstats
path: root/src/tests/common_dom.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-06-23 17:50:45 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-07-01 11:43:14 +0200
commit919cfb623e9b725eaa654c6e1b513d1305057314 (patch)
tree95d4280d3c37cd758029d8e695470581bfe53efb /src/tests/common_dom.c
parent0f495aa73529b06b0a8b4c39cfd098351c4f6760 (diff)
downloadsssd-919cfb623e9b725eaa654c6e1b513d1305057314.tar.gz
sssd-919cfb623e9b725eaa654c6e1b513d1305057314.tar.xz
sssd-919cfb623e9b725eaa654c6e1b513d1305057314.zip
TESTS: Add confdb domain base DN to sss_test_ctx
Creation of the path to the domain's confdb entry was duplicated in the tests. Rather than adding yet another duplication, I added the path as another field of the sss_test_ctx structure. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/tests/common_dom.c')
-rw-r--r--src/tests/common_dom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c
index d3a7781c3..b96db8d90 100644
--- a/src/tests/common_dom.c
+++ b/src/tests/common_dom.c
@@ -53,6 +53,14 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
goto fail;
}
+ test_ctx->conf_dom_path = talloc_asprintf(test_ctx,
+ CONFDB_DOMAIN_PATH_TMPL,
+ domain_name);
+ if (test_ctx->conf_dom_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, test_ctx->confdb_path);
if (ret != EOK) {