summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-01-23 12:57:33 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-02-29 12:53:47 -0500
commitd2d2d6ae0c436461bcc8f881df059eb036314c44 (patch)
tree679d929d1b5aa4106413179d99e86c60c200279c /src/tests
parentb97595ae059c69b1960a6e7e56d74660388a683b (diff)
downloadsssd-d2d2d6ae0c436461bcc8f881df059eb036314c44.tar.gz
sssd-d2d2d6ae0c436461bcc8f881df059eb036314c44.tar.bz2
sssd-d2d2d6ae0c436461bcc8f881df059eb036314c44.zip
Keep sysdb context in domain info struct
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/auth-tests.c12
-rw-r--r--src/tests/sysdb-tests.c12
2 files changed, 6 insertions, 18 deletions
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);