summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-21 11:51:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:05 -0500
commit7d5f3e290c2ac485a2845491865883cdfe4fcf7d (patch)
tree8c6581c765fc808081d53c11136e9d64d5934d9c /source4/torture
parent7ae4b79e94833229459e5903e11e6c3effc85ace (diff)
downloadsamba-7d5f3e290c2ac485a2845491865883cdfe4fcf7d.tar.gz
samba-7d5f3e290c2ac485a2845491865883cdfe4fcf7d.tar.bz2
samba-7d5f3e290c2ac485a2845491865883cdfe4fcf7d.zip
r25284: add WINBIND-STRUCT-DOMAIN_NAME test
this may needs --option="torture:winbindd netbios domain=BAR" metze (This used to be commit 3aba871fc35821f4660749db6e449846fc6b8753)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/winbind/struct_based.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index a49d8e5d87..5369a1653b 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -121,6 +121,30 @@ static bool torture_winbind_struct_netbios_name(struct torture_context *torture)
return true;
}
+static bool torture_winbind_struct_domain_name(struct torture_context *torture)
+{
+ struct winbindd_request req;
+ struct winbindd_response rep;
+ const char *expected;
+
+ ZERO_STRUCT(req);
+ ZERO_STRUCT(rep);
+
+ torture_comment(torture, "Running WINBINDD_DOMAIN_NAME (struct based)\n");
+
+ DO_STRUCT_REQ_REP(WINBINDD_DOMAIN_NAME, &req, &rep);
+
+ expected = torture_setting_string(torture,
+ "winbindd netbios domain",
+ lp_workgroup());
+
+ torture_assert_str_equal(torture,
+ rep.data.domain_name, expected,
+ "winbindd's netbios domain doesn't match");
+
+ return true;
+}
+
struct torture_trust_domain {
const char *netbios_name;
const char *dns_name;
@@ -305,6 +329,7 @@ struct torture_suite *torture_winbind_struct_init(void)
torture_suite_add_simple_test(suite, "INTERFACE_VERSION", torture_winbind_struct_interface_version);
torture_suite_add_simple_test(suite, "PING", torture_winbind_struct_ping);
torture_suite_add_simple_test(suite, "NETBIOS_NAME", torture_winbind_struct_netbios_name);
+ torture_suite_add_simple_test(suite, "DOMAIN_NAME", torture_winbind_struct_domain_name);
torture_suite_add_simple_test(suite, "LIST_TRUSTDOM", torture_winbind_struct_list_trustdom);
torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname);