From d2d2d6ae0c436461bcc8f881df059eb036314c44 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 23 Jan 2012 12:57:33 +0100 Subject: Keep sysdb context in domain info struct --- src/tests/auth-tests.c | 12 +++--------- src/tests/sysdb-tests.c | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) (limited to 'src/tests') diff --git a/src/tests/auth-tests.c b/src/tests/auth-tests.c index 96bae98e..4d25e2ef 100644 --- a/src/tests/auth-tests.c +++ b/src/tests/auth-tests.c @@ -134,15 +134,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); 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); -- cgit