r25279: - test in the generic get_trusted_domains() function that we got
authorStefan Metzmacher <metze@samba.org>
Fri, 21 Sep 2007 10:40:10 +0000 (10:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:07:04 +0000 (15:07 -0500)
  at least 2 domains.
- change the ordering of the tests

metze
(This used to be commit 22eb3095d622e4cee559387900e5a7d9cfb51171)

source4/torture/winbind/struct_based.c

index 33ed0c79deffbcb5b1cef43bae242754649ce1fe..5b6ce059a1e0cdc0c2c7b0bc0d1fa0d3dd6c0777 100644 (file)
@@ -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");