summaryrefslogtreecommitdiff
path: root/source4/torture/winbind
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2015-04-28 14:20:35 +1200
committerAndrew Bartlett <abartlet@samba.org>2015-05-06 01:22:14 +0200
commita62e78cef61c1f3f602db39027433e6a1b71c110 (patch)
treea525d08bd3342e6007c337e3aefff69e74e6f2f1 /source4/torture/winbind
parent406cd32126d223d79bdb4328f5404889b4f11d52 (diff)
downloadsamba-a62e78cef61c1f3f602db39027433e6a1b71c110.tar.gz
torture-winbind: Assert that the list of trusted domains is not NULL
By doing this, we avoid the test being dependent on if the lsa trusted domains tests have run. Otherwise, we may have a non-null extra_data against the internal winbind, but only 1 trusted domain (torturedom), but not the local domains that were expected Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/torture/winbind')
-rw-r--r--source4/torture/winbind/struct_based.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index be6ca5145ae..a7b6bfd8e35 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -285,11 +285,10 @@ static bool get_trusted_domains(struct torture_context *torture,
DO_STRUCT_REQ_REP(WINBINDD_LIST_TRUSTDOM, &req, &rep);
extra_data = (char *)rep.extra_data.data;
- if (!extra_data) {
- return true;
- }
-
- torture_assert(torture, extra_data, "NULL trust list");
+ torture_assert(torture, extra_data != NULL,
+ "Trust list was NULL: the list of trusted domain "
+ "should be returned, with at least 2 entries "
+ "(BUILTIN, and the local domain)");
while (next_token(&extra_data, line, "\n", sizeof(line))) {
char *p, *lp;
@@ -324,7 +323,8 @@ static bool get_trusted_domains(struct torture_context *torture,
SAFE_FREE(rep.extra_data.data);
torture_assert(torture, dcount >= 2,
- "The list of trusted domain should contain 2 entries");
+ "The list of trusted domain should contain 2 entries "
+ "(BUILTIN, and the local domain)");
*_d = d;
return true;