diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-05-18 10:06:19 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-08-15 09:16:38 -0400 |
commit | 8a1738f9379a1b8fb5c95c3df649e014ff5a1434 (patch) | |
tree | dd5a59e95b88d1edb7b21a5035692571422b454c /src/tests | |
parent | 237ade4114ae88f87c814d447dfd5aebdbdf72ef (diff) | |
download | sssd-8a1738f9379a1b8fb5c95c3df649e014ff5a1434.tar.gz sssd-8a1738f9379a1b8fb5c95c3df649e014ff5a1434.tar.bz2 sssd-8a1738f9379a1b8fb5c95c3df649e014ff5a1434.zip |
sysdb refactoring: deleted domain variables in sysdb API
The patch also updates code using modified functions. Tests have also
been adjusted.
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/sysdb-tests.c | 164 |
1 files changed, 56 insertions, 108 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index d0f7ab42..57edeece 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -190,8 +190,7 @@ static int test_add_user(struct test_data *data) homedir = talloc_asprintf(data, "/home/testuser%d", data->uid); gecos = talloc_asprintf(data, "Test User %d", data->uid); - ret = sysdb_add_user(data, data->ctx->sysdb, - data->ctx->domain, data->username, + ret = sysdb_add_user(data, data->ctx->sysdb, data->username, data->uid, 0, gecos, homedir, "/bin/bash", NULL, 0); return ret; @@ -206,8 +205,7 @@ static int test_store_user(struct test_data *data) homedir = talloc_asprintf(data, "/home/testuser%d", data->uid); gecos = talloc_asprintf(data, "Test User %d", data->uid); - ret = sysdb_store_user(data, data->ctx->sysdb, - data->ctx->domain, data->username, "x", + ret = sysdb_store_user(data, data->ctx->sysdb, data->username, "x", data->uid, 0, gecos, homedir, data->shell ? data->shell : "/bin/bash", NULL, NULL, -1); @@ -230,8 +228,7 @@ static int test_remove_user_by_uid(struct test_data *data) { int ret; - ret = sysdb_delete_user(data, data->ctx->sysdb, - data->ctx->domain, NULL, data->uid); + ret = sysdb_delete_user(data, data->ctx->sysdb, NULL, data->uid); return ret; } @@ -239,8 +236,7 @@ static int test_remove_nonexistent_group(struct test_data *data) { int ret; - ret = sysdb_delete_group(data, data->ctx->sysdb, - data->ctx->domain, NULL, data->uid); + ret = sysdb_delete_group(data, data->ctx->sysdb, NULL, data->uid); return ret; } @@ -248,8 +244,7 @@ static int test_remove_nonexistent_user(struct test_data *data) { int ret; - ret = sysdb_delete_user(data, data->ctx->sysdb, - data->ctx->domain, NULL, data->uid); + ret = sysdb_delete_user(data, data->ctx->sysdb, NULL, data->uid); return ret; } @@ -257,8 +252,7 @@ static int test_add_group(struct test_data *data) { int ret; - ret = sysdb_add_group(data, data->ctx->sysdb, - data->ctx->domain, data->groupname, + ret = sysdb_add_group(data, data->ctx->sysdb, data->groupname, data->gid, NULL, 0); return ret; } @@ -267,8 +261,8 @@ static int test_add_incomplete_group(struct test_data *data) { int ret; - ret = sysdb_add_incomplete_group(data->ctx->sysdb, data->ctx->domain, - data->groupname, data->gid, NULL, true); + ret = sysdb_add_incomplete_group(data->ctx->sysdb, data->groupname, + data->gid, NULL, true); return ret; } @@ -276,8 +270,7 @@ static int test_store_group(struct test_data *data) { int ret; - ret = sysdb_store_group(data, data->ctx->sysdb, - data->ctx->domain, data->groupname, + ret = sysdb_store_group(data, data->ctx->sysdb, data->groupname, data->gid, NULL, -1); return ret; } @@ -298,8 +291,7 @@ static int test_remove_group_by_gid(struct test_data *data) { int ret; - ret = sysdb_delete_group(data, data->ctx->sysdb, - data->ctx->domain, NULL, data->gid); + ret = sysdb_delete_group(data, data->ctx->sysdb, NULL, data->gid); if (ret == ENOENT) { ret = EOK; } @@ -310,8 +302,7 @@ static int test_set_user_attr(struct test_data *data) { int ret; - ret = sysdb_set_user_attr(data, data->ctx->sysdb, - data->ctx->domain, data->username, + ret = sysdb_set_user_attr(data, data->ctx->sysdb, data->username, data->attrs, SYSDB_MOD_REP); return ret; } @@ -327,7 +318,6 @@ static int test_add_group_member(struct test_data *data) } ret = sysdb_add_group_member(data->ctx->sysdb, - data->ctx->domain, data->groupname, username, SYSDB_MEMBER_USER); return ret; @@ -344,7 +334,6 @@ static int test_remove_group_member(struct test_data *data) } ret = sysdb_remove_group_member(data->ctx->sysdb, - data->ctx->domain, data->groupname, username, SYSDB_MEMBER_USER); return ret; @@ -360,8 +349,7 @@ static int test_store_custom(struct test_data *data) return ENOMEM; } - ret = sysdb_store_custom(data, data->ctx->sysdb, - data->ctx->domain, object_name, + ret = sysdb_store_custom(data, data->ctx->sysdb, object_name, CUSTOM_TEST_CONTAINER, data->attrs); return ret; } @@ -370,7 +358,7 @@ static int test_delete_custom(struct test_data *data) { int ret; - ret = sysdb_delete_custom(data, data->ctx->sysdb, data->ctx->domain, + ret = sysdb_delete_custom(data, data->ctx->sysdb, CUSTOM_TEST_OBJECT, CUSTOM_TEST_CONTAINER); return ret; } @@ -431,8 +419,7 @@ static int test_memberof_store_group(struct test_data *data) } } - ret = sysdb_store_group(data, data->ctx->sysdb, - data->ctx->domain, data->groupname, + ret = sysdb_store_group(data, data->ctx->sysdb, data->groupname, data->gid, attrs, -1); return ret; } @@ -444,7 +431,7 @@ static int test_add_basic_netgroup(struct test_data *data) description = talloc_asprintf(data, "Test Netgroup %d", data->uid); - ret = sysdb_add_basic_netgroup(data->ctx->sysdb, data->ctx->domain, + ret = sysdb_add_basic_netgroup(data->ctx->sysdb, data->netgrname, description); return ret; } @@ -465,8 +452,7 @@ static int test_remove_netgroup_by_name(struct test_data *data) { int ret; - ret = sysdb_delete_netgroup(data->ctx->sysdb, data->ctx->domain, - data->netgrname); + ret = sysdb_delete_netgroup(data->ctx->sysdb, data->netgrname); return ret; } @@ -488,7 +474,7 @@ static int test_set_netgroup_attr(struct test_data *data) return ret; } - ret = sysdb_set_netgroup_attr(data->ctx->sysdb, data->ctx->domain, + ret = sysdb_set_netgroup_attr(data->ctx->sysdb, data->netgrname, attrs, SYSDB_MOD_REP); return ret; } @@ -774,7 +760,6 @@ START_TEST (test_sysdb_getpwnam) ret = sysdb_getpwnam(test_ctx, test_ctx->sysdb, - test_ctx->domain, username, &res); if (ret) { fail("sysdb_getpwnam failed for username %s (%d: %s)", @@ -795,7 +780,6 @@ START_TEST (test_sysdb_getpwnam) ret = sysdb_getpwnam(test_ctx, test_ctx->sysdb, - test_ctx->domain, username, &res); if (ret) { fail("sysdb_getpwnam failed for username %s (%d: %s)", @@ -831,7 +815,6 @@ START_TEST (test_sysdb_getgrnam) ret = sysdb_getgrnam(test_ctx, test_ctx->sysdb, - test_ctx->domain, groupname, &res); if (ret) { fail("sysdb_getgrnam failed for groupname %s (%d: %s)", @@ -854,7 +837,6 @@ START_TEST (test_sysdb_getgrnam) ret = sysdb_getgrnam(test_ctx, test_ctx->sysdb, - test_ctx->domain, groupname, &res); if (ret) { fail("sysdb_getgrnam failed for groupname %s (%d: %s)", @@ -888,7 +870,6 @@ START_TEST (test_sysdb_getgrgid) ret = sysdb_getgrgid(test_ctx, test_ctx->sysdb, - test_ctx->domain, _i, &res); if (ret) { fail("sysdb_getgrgid failed for gid %d (%d: %s)", @@ -929,7 +910,6 @@ START_TEST (test_sysdb_getpwuid) ret = sysdb_getpwuid(test_ctx, test_ctx->sysdb, - test_ctx->domain, _i, &res); if (ret) { fail("sysdb_getpwuid failed for uid %d (%d: %s)", @@ -968,7 +948,6 @@ START_TEST (test_sysdb_enumgrent) ret = sysdb_enumgrent(test_ctx, test_ctx->sysdb, - test_ctx->domain, &res); fail_unless(ret == EOK, "sysdb_enumgrent failed (%d: %s)", @@ -996,7 +975,6 @@ START_TEST (test_sysdb_enumpwent) ret = sysdb_enumpwent(test_ctx, test_ctx->sysdb, - test_ctx->domain, &res); fail_unless(ret == EOK, "sysdb_enumpwent failed (%d: %s)", @@ -1068,8 +1046,7 @@ START_TEST (test_sysdb_get_user_attr) username = talloc_asprintf(test_ctx, "testuser%d", _i); ret = sysdb_get_user_attr(test_ctx, test_ctx->sysdb, - test_ctx->domain, username, - attrs, &res); + username, attrs, &res); if (ret) { fail("Could not get attributes for user %s", username); goto done; @@ -1252,7 +1229,6 @@ START_TEST (test_sysdb_search_custom_by_name) fail_unless(object_name != NULL, "talloc_asprintf failed"); ret = sysdb_search_custom_by_name(data, data->ctx->sysdb, - data->ctx->domain, object_name, CUSTOM_TEST_CONTAINER, data->attrlist, @@ -1355,7 +1331,6 @@ START_TEST (test_sysdb_search_custom_update) fail_unless(object_name != NULL, "talloc_asprintf failed"); ret = sysdb_search_custom_by_name(data, data->ctx->sysdb, - data->ctx->domain, object_name, CUSTOM_TEST_CONTAINER, data->attrlist, @@ -1421,7 +1396,6 @@ START_TEST (test_sysdb_search_custom) data->attrlist[2] = NULL; ret = sysdb_search_custom(data, data->ctx->sysdb, - data->ctx->domain, filter, CUSTOM_TEST_CONTAINER, data->attrlist, @@ -1478,8 +1452,7 @@ START_TEST (test_sysdb_cache_password) data->username = talloc_asprintf(data, "testuser%d", _i); ret = sysdb_cache_password(data, test_ctx->sysdb, - test_ctx->domain, data->username, - data->username); + data->username, data->username); fail_unless(ret == EOK, "sysdb_cache_password request failed [%d].", ret); @@ -1517,8 +1490,7 @@ static void cached_authentication_without_expiration(const char *username, return; } - ret = sysdb_cache_auth(data, test_ctx->sysdb, - test_ctx->domain, data->username, + ret = sysdb_cache_auth(data, test_ctx->sysdb, data->username, (const uint8_t *)password, strlen(password), test_ctx->confdb, false, &expire_date, &delayed_until); @@ -1574,13 +1546,11 @@ static void cached_authentication_with_expiration(const char *username, data->attrs = sysdb_new_attrs(data); ret = sysdb_attrs_add_time_t(data->attrs, SYSDB_LAST_ONLINE_AUTH, now); - ret = sysdb_set_user_attr(data, data->ctx->sysdb, - data->ctx->domain, data->username, + ret = sysdb_set_user_attr(data, data->ctx->sysdb, data->username, data->attrs, SYSDB_MOD_REP); fail_unless(ret == EOK, "Could not modify user %s", data->username); - ret = sysdb_cache_auth(data, test_ctx->sysdb, - test_ctx->domain, data->username, + ret = sysdb_cache_auth(data, test_ctx->sysdb, data->username, (const uint8_t *) password, strlen(password), test_ctx->confdb, false, &expire_date, &delayed_until); @@ -1712,7 +1682,7 @@ START_TEST (test_sysdb_asq_search) fail_unless(user_dn != NULL, "sysdb_user_dn failed"); ret = sysdb_asq_search(data, test_ctx->sysdb, - test_ctx->domain, user_dn, NULL, "memberof", + user_dn, NULL, "memberof", data->attrlist, &msgs_count, &msgs); fail_if(ret != EOK, "Failed to send ASQ search request.\n"); @@ -2009,7 +1979,7 @@ START_TEST (test_sysdb_memberof_check_memberuid_without_group_5) data->attrlist[1] = NULL; ret = sysdb_search_group_by_gid(data, test_ctx->sysdb, - data->ctx->domain, _i + MBO_GROUP_BASE, + _i + MBO_GROUP_BASE, data->attrlist, &data->msg); if (_i == 5) { fail_unless(ret == ENOENT, @@ -2060,7 +2030,7 @@ START_TEST (test_sysdb_memberof_check_memberuid) data->attrlist[1] = NULL; ret = sysdb_search_group_by_gid(data, test_ctx->sysdb, - data->ctx->domain, _i + MBO_GROUP_BASE, + _i + MBO_GROUP_BASE, data->attrlist, &data->msg); fail_if(ret != EOK, "Could not check group %d", data->gid); @@ -2102,7 +2072,7 @@ START_TEST (test_sysdb_memberof_check_memberuid_loop) data->attrlist[1] = NULL; ret = sysdb_search_group_by_gid(data, test_ctx->sysdb, - data->ctx->domain, _i + MBO_GROUP_BASE, + _i + MBO_GROUP_BASE, data->attrlist, &data->msg); fail_if(ret != EOK, "Could not check group %d", data->gid); @@ -2144,7 +2114,7 @@ START_TEST (test_sysdb_memberof_check_memberuid_loop_without_group_5) data->attrlist[1] = NULL; ret = sysdb_search_group_by_gid(data, test_ctx->sysdb, - data->ctx->domain, _i + MBO_GROUP_BASE, + _i + MBO_GROUP_BASE, data->attrlist, &data->msg); if (_i == 5) { @@ -2221,8 +2191,7 @@ START_TEST (test_sysdb_update_members) add_groups[1] = talloc_strdup(add_groups, "testgroup28002"); add_groups[2] = NULL; - ret = sysdb_update_members(test_ctx->sysdb, test_ctx->domain, user, - SYSDB_MEMBER_USER, + ret = sysdb_update_members(test_ctx->sysdb, user, SYSDB_MEMBER_USER, (const char *const *)add_groups, NULL); fail_unless(ret == EOK, "Could not add groups"); talloc_zfree(add_groups); @@ -2235,8 +2204,7 @@ START_TEST (test_sysdb_update_members) add_groups[0] = talloc_strdup(add_groups, "testgroup28003"); add_groups[1] = NULL; - ret = sysdb_update_members(test_ctx->sysdb, test_ctx->domain, user, - SYSDB_MEMBER_USER, + ret = sysdb_update_members(test_ctx->sysdb, user, SYSDB_MEMBER_USER, (const char *const *)add_groups, (const char *const *)del_groups); fail_unless(ret == EOK, "Group replace failed"); @@ -2249,10 +2217,8 @@ START_TEST (test_sysdb_update_members) del_groups[1] = talloc_strdup(del_groups, "testgroup28003"); del_groups[2] = NULL; - ret = sysdb_update_members(test_ctx->sysdb, test_ctx->domain, - user, SYSDB_MEMBER_USER, - NULL, - (const char *const *)del_groups); + ret = sysdb_update_members(test_ctx->sysdb, user, SYSDB_MEMBER_USER, + NULL, (const char *const *)del_groups); fail_unless(ret == EOK, "Could not remove groups"); talloc_zfree(test_ctx); @@ -2336,8 +2302,7 @@ START_TEST (test_sysdb_search_netgroup_by_name) netgrname = talloc_asprintf(test_ctx, "testnetgr%d", _i); ret = sysdb_search_netgroup_by_name(test_ctx, test_ctx->sysdb, - test_ctx->domain, netgrname, - NULL, &msg); + netgrname, NULL, &msg); fail_if(ret != EOK, "Could not find netgroup with name %s", netgrname); netgroup_dn = sysdb_netgroup_dn(test_ctx->sysdb, test_ctx, @@ -2445,8 +2410,7 @@ START_TEST (test_sysdb_get_netgroup_attr) netgrname = talloc_asprintf(test_ctx, "testnetgr%d", _i); ret = sysdb_get_netgroup_attr(test_ctx, test_ctx->sysdb, - test_ctx->domain, netgrname, - attrs, &res); + netgrname, attrs, &res); fail_if(ret != EOK, "Could not get netgroup attributes"); fail_if(res->count != 1, @@ -2489,14 +2453,13 @@ START_TEST(test_sysdb_add_netgroup_tuple) domainname = talloc_asprintf(test_ctx, "domainname%d", _i); fail_if(domainname == NULL, "Out of memory"); - ret = sysdb_add_netgroup_tuple(test_ctx->sysdb, test_ctx->domain, + ret = sysdb_add_netgroup_tuple(test_ctx->sysdb, netgrname, hostname, username, domainname); fail_unless(ret == EOK, "Failed to add netgr tuple"); ret = sysdb_getnetgr(test_ctx, test_ctx->sysdb, - test_ctx->domain, netgrname, - &res); + netgrname, &res); fail_unless(ret == EOK, "Failed to retrieve netgr information"); ret = sysdb_netgr_to_entries(test_ctx, res, &entries); @@ -2551,14 +2514,13 @@ START_TEST(test_sysdb_remove_netgroup_tuple) domainname = talloc_asprintf(test_ctx, "domainname%d", _i); fail_if(domainname == NULL, "Out of memory"); - ret = sysdb_remove_netgroup_tuple(test_ctx->sysdb, test_ctx->domain, + ret = sysdb_remove_netgroup_tuple(test_ctx->sysdb, netgrname, hostname, username, domainname); fail_unless(ret == EOK, "Failed to remove netgr tuple"); ret = sysdb_getnetgr(test_ctx, test_ctx->sysdb, - test_ctx->domain, netgrname, - &res); + netgrname, &res); fail_unless(ret == EOK, "Failed to retrieve netgr information"); ret = sysdb_netgr_to_entries(test_ctx, res, &entries); @@ -2609,13 +2571,11 @@ START_TEST(test_sysdb_add_netgroup_member) domainname1 = talloc_asprintf(test_ctx, "domainname%d", _i); domainname2 = talloc_asprintf(test_ctx, "domainname%d", _i+1); - ret = sysdb_add_netgroup_member(test_ctx->sysdb, test_ctx->domain, - netgrname, membername); + ret = sysdb_add_netgroup_member(test_ctx->sysdb, netgrname, membername); fail_unless(ret == EOK, "Failed to add netgr member"); ret = sysdb_getnetgr(test_ctx, test_ctx->sysdb, - test_ctx->domain, netgrname, - &res); + netgrname, &res); fail_unless(ret == EOK, "Failed to retrieve netgr information"); ret = sysdb_netgr_to_entries(test_ctx, res, &entries); @@ -2684,13 +2644,11 @@ START_TEST(test_sysdb_remove_netgroup_member) username = talloc_asprintf(test_ctx, "username%d", _i); domainname = talloc_asprintf(test_ctx, "domainname%d", _i); - ret = sysdb_remove_netgroup_member(test_ctx->sysdb, test_ctx->domain, - netgrname, membername); + ret = sysdb_remove_netgroup_member(test_ctx->sysdb, netgrname, membername); fail_unless(ret == EOK, "Failed to add netgr member"); ret = sysdb_getnetgr(test_ctx, test_ctx->sysdb, - test_ctx->domain, netgrname, - &res); + netgrname, &res); fail_unless(ret == EOK, "Failed to retrieve netgr information"); ret = sysdb_netgr_to_entries(test_ctx, res, &entries); @@ -2742,20 +2700,19 @@ START_TEST(test_odd_characters) /* ===== Groups ===== */ /* Add */ - ret = sysdb_add_incomplete_group(test_ctx->sysdb, test_ctx->domain, + ret = sysdb_add_incomplete_group(test_ctx->sysdb, odd_groupname, 20000, NULL, true); fail_unless(ret == EOK, "sysdb_add_incomplete_group error [%d][%s]", ret, strerror(ret)); /* Retrieve */ - ret = sysdb_search_group_by_name(test_ctx, test_ctx->sysdb, test_ctx->domain, + ret = sysdb_search_group_by_name(test_ctx, test_ctx->sysdb, odd_groupname, NULL, &msg); fail_unless(ret == EOK, "sysdb_search_group_by_name error [%d][%s]", ret, strerror(ret)); talloc_zfree(msg); - ret = sysdb_getgrnam(test_ctx, test_ctx->sysdb, test_ctx->domain, - odd_groupname, &res); + ret = sysdb_getgrnam(test_ctx, test_ctx->sysdb, odd_groupname, &res); fail_unless(ret == EOK, "sysdb_getgrnam error [%d][%s]", ret, strerror(ret)); fail_unless(res->count == 1, "Received [%d] responses", @@ -2772,7 +2729,6 @@ START_TEST(test_odd_characters) /* Add */ ret = sysdb_add_basic_user(test_ctx, test_ctx->sysdb, - test_ctx->domain, odd_username, 10000, 10000, "","",""); @@ -2780,7 +2736,7 @@ START_TEST(test_odd_characters) ret, strerror(ret)); /* Retrieve */ - ret = sysdb_search_user_by_name(test_ctx, test_ctx->sysdb, test_ctx->domain, + ret = sysdb_search_user_by_name(test_ctx, test_ctx->sysdb, odd_username, NULL, &msg); fail_unless(ret == EOK, "sysdb_search_user_by_name error [%d][%s]", ret, strerror(ret)); @@ -2791,14 +2747,12 @@ START_TEST(test_odd_characters) talloc_zfree(msg); /* Add to the group */ - ret = sysdb_add_group_member(test_ctx->sysdb, test_ctx->domain, - odd_groupname, odd_username, + ret = sysdb_add_group_member(test_ctx->sysdb, odd_groupname, odd_username, SYSDB_MEMBER_USER); fail_unless(ret == EOK, "sysdb_add_group_member error [%d][%s]", ret, strerror(ret)); - ret = sysdb_getpwnam(test_ctx, test_ctx->sysdb, test_ctx->domain, - odd_username, &res); + ret = sysdb_getpwnam(test_ctx, test_ctx->sysdb, odd_username, &res); fail_unless(ret == EOK, "sysdb_getpwnam error [%d][%s]", ret, strerror(ret)); fail_unless(res->count == 1, "Received [%d] responses", @@ -2810,35 +2764,33 @@ START_TEST(test_odd_characters) talloc_zfree(res); /* Attributes */ - ret = sysdb_get_user_attr(test_ctx, test_ctx->sysdb, test_ctx->domain, + ret = sysdb_get_user_attr(test_ctx, test_ctx->sysdb, odd_username, user_attrs, &res); fail_unless(ret == EOK, "sysdb_get_user_attr error [%d][%s]", ret, strerror(ret)); talloc_free(res); /* Delete User */ - ret = sysdb_delete_user(test_ctx, test_ctx->sysdb, test_ctx->domain, - odd_username, 10000); + ret = sysdb_delete_user(test_ctx, test_ctx->sysdb, odd_username, 10000); fail_unless(ret == EOK, "sysdb_delete_user error [%d][%s]", ret, strerror(ret)); /* Delete Group */ - ret = sysdb_delete_group(test_ctx, test_ctx->sysdb, test_ctx->domain, - odd_groupname, 20000); + ret = sysdb_delete_group(test_ctx, test_ctx->sysdb, odd_groupname, 20000); fail_unless(ret == EOK, "sysdb_delete_group error [%d][%s]", ret, strerror(ret)); /* ===== Netgroups ===== */ /* Add */ - ret = sysdb_add_netgroup(test_ctx->sysdb, test_ctx->domain, + ret = sysdb_add_netgroup(test_ctx->sysdb, odd_netgroupname, "No description", NULL, 30); fail_unless(ret == EOK, "sysdb_add_netgroup error [%d][%s]", ret, strerror(ret)); /* Retrieve */ - ret = sysdb_getnetgr(test_ctx, test_ctx->sysdb, test_ctx->domain, + ret = sysdb_getnetgr(test_ctx, test_ctx->sysdb, odd_netgroupname, &res); fail_unless(ret == EOK, "sysdb_getnetgr error [%d][%s]", ret, strerror(ret)); @@ -2846,7 +2798,7 @@ START_TEST(test_odd_characters) res->count); talloc_zfree(res); - ret = sysdb_get_netgroup_attr(test_ctx, test_ctx->sysdb, test_ctx->domain, + ret = sysdb_get_netgroup_attr(test_ctx, test_ctx->sysdb, odd_netgroupname, netgr_attrs, &res); fail_unless(ret == EOK, "sysdb_get_netgroup_attr error [%d][%s]", ret, strerror(ret)); @@ -2870,23 +2822,19 @@ START_TEST(test_sysdb_has_enumerated) ret = setup_sysdb_tests(&test_ctx); fail_if(ret != EOK, "Could not set up the test"); - ret = sysdb_has_enumerated(test_ctx->sysdb, - test_ctx->domain, - &enumerated); + ret = sysdb_has_enumerated(test_ctx->sysdb, &enumerated); fail_if(ret != EOK, "Error [%d][%s] checking enumeration", ret, strerror(ret)); fail_if(enumerated, "Enumeration should default to false"); ret = sysdb_set_enumerated(test_ctx->sysdb, - test_ctx->domain, true); fail_if(ret != EOK, "Error [%d][%s] setting enumeration", ret, strerror(ret)); /* Recheck enumeration status */ ret = sysdb_has_enumerated(test_ctx->sysdb, - test_ctx->domain, &enumerated); fail_if(ret != EOK, "Error [%d][%s] checking enumeration", ret, strerror(ret)); @@ -2911,14 +2859,14 @@ START_TEST(test_sysdb_original_dn_case_insensitive) ret = setup_sysdb_tests(&test_ctx); fail_if(ret != EOK, "Could not set up the test"); - ret = sysdb_add_incomplete_group(test_ctx->sysdb, test_ctx->domain, + ret = sysdb_add_incomplete_group(test_ctx->sysdb, "case_sensitive_group1", 29000, "cn=case_sensitive_group1,cn=example,cn=com", true); fail_unless(ret == EOK, "sysdb_add_incomplete_group error [%d][%s]", ret, strerror(ret)); - ret = sysdb_add_incomplete_group(test_ctx->sysdb, test_ctx->domain, + ret = sysdb_add_incomplete_group(test_ctx->sysdb, "case_sensitive_group2", 29001, "cn=CASE_SENSITIVE_GROUP1,cn=EXAMPLE,cn=COM", true); |