diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-03-28 11:51:21 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-03-28 15:07:05 -0400 |
commit | 4790f7b3cff3800df92b232aec1d779db52c72b1 (patch) | |
tree | 5be847ebe6bd3a54c186751e8c93ac1549410d3e /src/tests/ipa_ldap_opt-tests.c | |
parent | 419ddca29f074cf446c316b735fbbafc59084458 (diff) | |
download | sssd-4790f7b3cff3800df92b232aec1d779db52c72b1.tar.gz sssd-4790f7b3cff3800df92b232aec1d779db52c72b1.tar.xz sssd-4790f7b3cff3800df92b232aec1d779db52c72b1.zip |
Add better dp_option tests
Diffstat (limited to 'src/tests/ipa_ldap_opt-tests.c')
-rw-r--r-- | src/tests/ipa_ldap_opt-tests.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/ipa_ldap_opt-tests.c b/src/tests/ipa_ldap_opt-tests.c index 2497c97c..c66a4738 100644 --- a/src/tests/ipa_ldap_opt-tests.c +++ b/src/tests/ipa_ldap_opt-tests.c @@ -27,7 +27,9 @@ #include <talloc.h> #include "providers/ipa/ipa_common.h" +#include "providers/ipa/ipa_opts.h" #include "providers/ldap/sdap.h" +#include "providers/ldap/ldap_opts.h" #include "providers/krb5/krb5_common.h" #include "tests/common.h" @@ -84,6 +86,20 @@ START_TEST(test_check_num_opts) } END_TEST +START_TEST(test_compare_opts) +{ + errno_t ret; + + ret = compare_dp_options(default_basic_opts, SDAP_OPTS_BASIC, + ipa_def_ldap_opts); + fail_unless(ret == EOK, "[%s]", strerror(ret)); + + ret = compare_dp_options(default_krb5_opts, KRB5_OPTS, + ipa_def_krb5_opts); + fail_unless(ret == EOK, "[%s]", strerror(ret)); +} +END_TEST + Suite *ipa_ldap_opt_suite (void) { Suite *s = suite_create ("ipa_ldap_opt"); @@ -91,6 +107,7 @@ Suite *ipa_ldap_opt_suite (void) TCase *tc_ipa_ldap_opt = tcase_create ("ipa_ldap_opt"); tcase_add_test (tc_ipa_ldap_opt, test_check_num_opts); + tcase_add_test (tc_ipa_ldap_opt, test_compare_opts); suite_add_tcase (s, tc_ipa_ldap_opt); TCase *tc_ipa_utils = tcase_create ("ipa_utils"); |