summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-11 09:37:16 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-04-20 10:55:15 -0400
commit5cdf893b7d0991e459911145b3c9b1011d31ca6b (patch)
tree8bd732d110fb09bbc080a7645c16eb5f7f6e3599 /src
parent1c1b73f82d98d3289b924f3ea499157195660af0 (diff)
downloadsssd-5cdf893b7d0991e459911145b3c9b1011d31ca6b.tar.gz
sssd-5cdf893b7d0991e459911145b3c9b1011d31ca6b.tar.bz2
sssd-5cdf893b7d0991e459911145b3c9b1011d31ca6b.zip
Test RFC2307bis and RFC2307 option maps
https://fedorahosted.org/sssd/ticket/1281 Only user, group and autofs maps are different. Services and netgroups are using the same map.
Diffstat (limited to 'src')
-rw-r--r--src/tests/ipa_ldap_opt-tests.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/ipa_ldap_opt-tests.c b/src/tests/ipa_ldap_opt-tests.c
index 4c881379..d1a96dc8 100644
--- a/src/tests/ipa_ldap_opt-tests.c
+++ b/src/tests/ipa_ldap_opt-tests.c
@@ -128,6 +128,33 @@ START_TEST(test_compare_sdap_attrs)
}
END_TEST
+START_TEST(test_compare_2307_with_2307bis)
+{
+ errno_t ret;
+
+ /* User Attributes */
+ ret = compare_sdap_attr_maps(rfc2307_user_map, SDAP_OPTS_USER,
+ rfc2307bis_user_map);
+ fail_unless(ret == EOK, "[%s]", strerror(ret));
+
+ /* Group Attributes */
+ ret = compare_sdap_attr_maps(rfc2307_group_map, SDAP_OPTS_GROUP,
+ rfc2307bis_group_map);
+ fail_unless(ret == EOK, "[%s]", strerror(ret));
+
+ /* AutoFS Attributes */
+ ret = compare_sdap_attr_maps(rfc2307_autofs_mobject_map,
+ SDAP_OPTS_AUTOFS_MAP,
+ rfc2307bis_autofs_mobject_map);
+ fail_unless(ret == EOK, "[%s]", strerror(ret));
+
+ ret = compare_sdap_attr_maps(rfc2307_autofs_entry_map,
+ SDAP_OPTS_AUTOFS_ENTRY,
+ rfc2307bis_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");
@@ -136,6 +163,7 @@ Suite *ipa_ldap_opt_suite (void)
tcase_add_test (tc_ipa_ldap_opt, test_compare_opts);
tcase_add_test (tc_ipa_ldap_opt, test_compare_sdap_attrs);
+ tcase_add_test (tc_ipa_ldap_opt, test_compare_2307_with_2307bis);
suite_add_tcase (s, tc_ipa_ldap_opt);
TCase *tc_ipa_utils = tcase_create ("ipa_utils");