diff options
author | Sumit Bose <sbose@redhat.com> | 2012-01-23 12:57:33 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-02-29 12:53:47 -0500 |
commit | d2d2d6ae0c436461bcc8f881df059eb036314c44 (patch) | |
tree | 679d929d1b5aa4106413179d99e86c60c200279c /src/tests | |
parent | b97595ae059c69b1960a6e7e56d74660388a683b (diff) | |
download | sssd-d2d2d6ae0c436461bcc8f881df059eb036314c44.tar.gz sssd-d2d2d6ae0c436461bcc8f881df059eb036314c44.tar.xz sssd-d2d2d6ae0c436461bcc8f881df059eb036314c44.zip |
Keep sysdb context in domain info struct
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/auth-tests.c | 12 | ||||
-rw-r--r-- | src/tests/sysdb-tests.c | 12 |
2 files changed, 6 insertions, 18 deletions
diff --git a/src/tests/auth-tests.c b/src/tests/auth-tests.c index 96bae98e6..4d25e2ef7 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 b3aaa2664..765b59d8a 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); |