summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 03:58:58 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit234958be042980242fff6da936af674da877c5ef (patch)
treea2f96f1cf185f950629f0718e9ce69e314c5fada /src/tests
parent72aa8e7b1d234b6b68446d42efa1cff22b70c81b (diff)
downloadsssd-234958be042980242fff6da936af674da877c5ef.tar.gz
sssd-234958be042980242fff6da936af674da877c5ef.tar.xz
sssd-234958be042980242fff6da936af674da877c5ef.zip
Refactor single domain initialization
Bring it out of sysdb, which will slowly remove internal dependencies on domains and instead will always require them to be passed by callers.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/auth-tests.c6
-rw-r--r--src/tests/sysdb-tests.c6
-rw-r--r--src/tests/sysdb_ssh-tests.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/tests/auth-tests.c b/src/tests/auth-tests.c
index ff8b9e1bd..7b53c9b92 100644
--- a/src/tests/auth-tests.c
+++ b/src/tests/auth-tests.c
@@ -134,14 +134,14 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx)
return ret;
}
- ret = sysdb_init_domain_and_sysdb(test_ctx, test_ctx->confdb, "local",
- TESTS_PATH,
- &test_ctx->domain, &test_ctx->sysdb);
+ ret = sssd_domain_init(test_ctx, test_ctx->confdb, "local",
+ TESTS_PATH, &test_ctx->domain);
if (ret != EOK) {
fail("Could not initialize connection to the sysdb (%d)", ret);
talloc_free(test_ctx);
return ret;
}
+ test_ctx->sysdb = test_ctx->domain->sysdb;
*ctx = test_ctx;
return EOK;
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index a5526280a..c2e20c0a6 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -145,14 +145,14 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx)
return ret;
}
- ret = sysdb_init_domain_and_sysdb(test_ctx, test_ctx->confdb, "local",
- TESTS_PATH,
- &test_ctx->domain, &test_ctx->sysdb);
+ ret = sssd_domain_init(test_ctx, test_ctx->confdb, "local",
+ TESTS_PATH, &test_ctx->domain);
if (ret != EOK) {
fail("Could not initialize connection to the sysdb (%d)", ret);
talloc_free(test_ctx);
return ret;
}
+ test_ctx->sysdb = test_ctx->domain->sysdb;
*ctx = test_ctx;
return EOK;
diff --git a/src/tests/sysdb_ssh-tests.c b/src/tests/sysdb_ssh-tests.c
index cb5bd4b30..013a1d43d 100644
--- a/src/tests/sysdb_ssh-tests.c
+++ b/src/tests/sysdb_ssh-tests.c
@@ -130,14 +130,14 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx)
return ret;
}
- ret = sysdb_init_domain_and_sysdb(test_ctx, test_ctx->confdb, "local",
- TESTS_PATH,
- &test_ctx->domain, &test_ctx->sysdb);
+ ret = sssd_domain_init(test_ctx, test_ctx->confdb, "local",
+ TESTS_PATH, &test_ctx->domain);
if (ret != EOK) {
fail("Could not initialize connection to the sysdb (%d)", ret);
talloc_free(test_ctx);
return ret;
}
+ test_ctx->sysdb = test_ctx->domain->sysdb;
*ctx = test_ctx;
return EOK;