summaryrefslogtreecommitdiffstats
path: root/src/tests/sysdb-tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/sysdb-tests.c')
-rw-r--r--src/tests/sysdb-tests.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index b3aaa266..765b59d8 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -141,15 +141,9 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx)
return ret;
}
- ret = confdb_get_domain(test_ctx->confdb, "local", &test_ctx->domain);
- if (ret != EOK) {
- fail("Could not retrieve LOCAL domain");
- talloc_free(test_ctx);
- return ret;
- }
-
- ret = sysdb_domain_init(test_ctx,
- test_ctx->domain, TESTS_PATH, &test_ctx->sysdb);
+ ret = sysdb_init_domain_and_sysdb(test_ctx, test_ctx->confdb, "local",
+ TESTS_PATH,
+ &test_ctx->domain, &test_ctx->sysdb);
if (ret != EOK) {
fail("Could not initialize connection to the sysdb (%d)", ret);
talloc_free(test_ctx);