diff options
author | Pavel Reichl <preichl@redhat.com> | 2014-07-21 08:01:58 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-22 09:40:04 +0200 |
commit | 9ca0071db0e226e4e65b2a80fdeddd5048ca8990 (patch) | |
tree | dc303a00d68b2113fad2e430263bfcb007f1ec59 /src/tests/cmocka/test_utils.c | |
parent | 594b76cd86e32164a22172e054750fe18d09b0d6 (diff) | |
download | sssd-9ca0071db0e226e4e65b2a80fdeddd5048ca8990.tar.gz sssd-9ca0071db0e226e4e65b2a80fdeddd5048ca8990.tar.xz sssd-9ca0071db0e226e4e65b2a80fdeddd5048ca8990.zip |
UTIL: rename find_subdomain_by_sid
The function was named "find_subdomain" yet it could find both main
domain and subdomain.
sed 's/find_subdomain_by_sid/find_domain_by_sid/' -i `find . -name "*.[ch]"`
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/tests/cmocka/test_utils.c')
-rw-r--r-- | src/tests/cmocka/test_utils.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c index e49e7eca5..59b6e08ba 100644 --- a/src/tests/cmocka/test_utils.c +++ b/src/tests/cmocka/test_utils.c @@ -306,23 +306,23 @@ void test_find_subdomain_by_name_disabled(void **state) } } -void test_find_subdomain_by_sid_null(void **state) +void test_find_domain_by_sid_null(void **state) { struct dom_list_test_ctx *test_ctx = talloc_get_type(*state, struct dom_list_test_ctx); struct sss_domain_info *dom; - dom = find_subdomain_by_sid(NULL, NULL); + dom = find_domain_by_sid(NULL, NULL); assert_null(dom); - dom = find_subdomain_by_sid(test_ctx->dom_list, NULL); + dom = find_domain_by_sid(test_ctx->dom_list, NULL); assert_null(dom); - dom = find_subdomain_by_sid(NULL, "S-1-5-21-1-2-3"); + dom = find_domain_by_sid(NULL, "S-1-5-21-1-2-3"); assert_null(dom); } -void test_find_subdomain_by_sid(void **state) +void test_find_domain_by_sid(void **state) { struct dom_list_test_ctx *test_ctx = talloc_get_type(*state, struct dom_list_test_ctx); @@ -342,7 +342,7 @@ void test_find_subdomain_by_sid(void **state) sid = talloc_asprintf(global_talloc_context, SID_TMPL, c); assert_non_null(sid); - dom = find_subdomain_by_sid(test_ctx->dom_list, sid); + dom = find_domain_by_sid(test_ctx->dom_list, sid); assert_non_null(dom); assert_string_equal(name, dom->name); assert_string_equal(flat_name, dom->flat_name); @@ -354,7 +354,7 @@ void test_find_subdomain_by_sid(void **state) } } -void test_find_subdomain_by_sid_missing_sid(void **state) +void test_find_domain_by_sid_missing_sid(void **state) { struct dom_list_test_ctx *test_ctx = talloc_get_type(*state, struct dom_list_test_ctx); @@ -386,7 +386,7 @@ void test_find_subdomain_by_sid_missing_sid(void **state) sid = talloc_asprintf(global_talloc_context, SID_TMPL, c); assert_non_null(sid); - dom = find_subdomain_by_sid(test_ctx->dom_list, sid); + dom = find_domain_by_sid(test_ctx->dom_list, sid); if (c == mis - 1) { assert_null(dom); } else { @@ -402,7 +402,7 @@ void test_find_subdomain_by_sid_missing_sid(void **state) } } -void test_find_subdomain_by_sid_disabled(void **state) +void test_find_domain_by_sid_disabled(void **state) { struct dom_list_test_ctx *test_ctx = talloc_get_type(*state, struct dom_list_test_ctx); @@ -434,7 +434,7 @@ void test_find_subdomain_by_sid_disabled(void **state) sid = talloc_asprintf(global_talloc_context, SID_TMPL, c); assert_non_null(sid); - dom = find_subdomain_by_sid(test_ctx->dom_list, sid); + dom = find_domain_by_sid(test_ctx->dom_list, sid); if (c == mis - 1) { assert_null(dom); } else { @@ -887,13 +887,13 @@ int main(int argc, const char *argv[]) }; const UnitTest tests[] = { - unit_test_setup_teardown(test_find_subdomain_by_sid_null, + unit_test_setup_teardown(test_find_domain_by_sid_null, setup_dom_list, teardown_dom_list), - unit_test_setup_teardown(test_find_subdomain_by_sid, + unit_test_setup_teardown(test_find_domain_by_sid, setup_dom_list, teardown_dom_list), - unit_test_setup_teardown(test_find_subdomain_by_sid_missing_sid, + unit_test_setup_teardown(test_find_domain_by_sid_missing_sid, setup_dom_list, teardown_dom_list), - unit_test_setup_teardown(test_find_subdomain_by_sid_disabled, + unit_test_setup_teardown(test_find_domain_by_sid_disabled, setup_dom_list, teardown_dom_list), unit_test_setup_teardown(test_find_subdomain_by_name_null, setup_dom_list, teardown_dom_list), |