diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-03-28 12:02:45 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-03-28 15:07:05 -0400 |
commit | 4ed94554593e8a20fa361ea8d7a7f223dc6ee4e8 (patch) | |
tree | 10bebb463468f92c3af3e484537a2edf2ec5de87 /src/tests/ipa_ldap_opt-tests.c | |
parent | e980f8b95f2fb89e872babffdd94b3ccb2d42ccf (diff) | |
download | sssd-4ed94554593e8a20fa361ea8d7a7f223dc6ee4e8.tar.gz sssd-4ed94554593e8a20fa361ea8d7a7f223dc6ee4e8.tar.xz sssd-4ed94554593e8a20fa361ea8d7a7f223dc6ee4e8.zip |
Add better tests for sdap_attr compability
Diffstat (limited to 'src/tests/ipa_ldap_opt-tests.c')
-rw-r--r-- | src/tests/ipa_ldap_opt-tests.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/tests/ipa_ldap_opt-tests.c b/src/tests/ipa_ldap_opt-tests.c index c66a4738..3f94d681 100644 --- a/src/tests/ipa_ldap_opt-tests.c +++ b/src/tests/ipa_ldap_opt-tests.c @@ -100,6 +100,43 @@ START_TEST(test_compare_opts) } END_TEST +START_TEST(test_compare_sdap_attrs) +{ + errno_t ret; + + /* General Attributes */ + ret = compare_sdap_attr_maps(generic_attr_map, SDAP_AT_GENERAL, + ipa_attr_map); + fail_unless(ret == EOK, "[%s]", strerror(ret)); + + /* User Attributes */ + ret = compare_sdap_attr_maps(rfc2307_user_map, SDAP_OPTS_USER, + ipa_user_map); + fail_unless(ret == EOK, "[%s]", strerror(ret)); + + /* Group Attributes */ + ret = compare_sdap_attr_maps(rfc2307_group_map, SDAP_OPTS_GROUP, + ipa_group_map); + fail_unless(ret == EOK, "[%s]", strerror(ret)); + + /* Service Attributes */ + ret = compare_sdap_attr_maps(service_map, SDAP_OPTS_SERVICES, + ipa_service_map); + fail_unless(ret == EOK, "[%s]", strerror(ret)); + + /* AutoFS Attributes */ + ret = compare_sdap_attr_maps(rfc2307_autofs_mobject_map, + SDAP_OPTS_AUTOFS_MAP, + ipa_autofs_mobject_map); + fail_unless(ret == EOK, "[%s]", strerror(ret)); + + ret = compare_sdap_attr_maps(rfc2307_autofs_entry_map, + SDAP_OPTS_AUTOFS_ENTRY, + ipa_autofs_entry_map); + fail_unless(ret == EOK, "[%s]", strerror(ret)); +} +END_TEST + Suite *ipa_ldap_opt_suite (void) { Suite *s = suite_create ("ipa_ldap_opt"); @@ -108,6 +145,7 @@ Suite *ipa_ldap_opt_suite (void) tcase_add_test (tc_ipa_ldap_opt, test_check_num_opts); tcase_add_test (tc_ipa_ldap_opt, test_compare_opts); + tcase_add_test (tc_ipa_ldap_opt, test_compare_sdap_attrs); suite_add_tcase (s, tc_ipa_ldap_opt); TCase *tc_ipa_utils = tcase_create ("ipa_utils"); |