From 18d4608e4368b2369f320eb870ae01d1746876c7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 21 Sep 2007 10:40:10 +0000 Subject: r25279: - test in the generic get_trusted_domains() function that we got at least 2 domains. - change the ordering of the tests metze (This used to be commit 22eb3095d622e4cee559387900e5a7d9cfb51171) --- source4/torture/winbind/struct_based.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index 33ed0c79de..5b6ce059a1 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -131,8 +131,11 @@ static bool get_trusted_domains(struct torture_context *torture, dcount++; } - SAFE_FREE(rep.extra_data.data); + + torture_assert(torture, dcount >= 2, + "The list of trusted domain should contain 2 entries"); + *_d = d; return true; } @@ -211,9 +214,6 @@ static bool torture_winbind_struct_list_trustdom(struct torture_context *torture */ } - torture_assert(torture, i >= 2, - "The list of trusted domain should contain 2 entries"); - return true; } @@ -243,8 +243,8 @@ struct torture_suite *torture_winbind_struct_init(void) struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "STRUCT"); torture_suite_add_simple_test(suite, "PING", torture_winbind_struct_ping); - torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname); torture_suite_add_simple_test(suite, "LIST_TRUSTDOM", torture_winbind_struct_list_trustdom); + torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname); suite->description = talloc_strdup(suite, "WINBIND - struct based protocol tests"); -- cgit