summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/tests
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@us.ibm.com>2012-08-14 13:50:23 -0700
committerAndrew Bartlett <abartlet@samba.org>2012-08-15 11:44:43 +1000
commit47082ad3fae086c168bfedaa2fba692eccff3145 (patch)
tree1428e57ab3318e48f4fbcdaa858eb0df8d635c6d /nsswitch/libwbclient/tests
parent4c8616f0c84bfd1b114df8bb158c06ca8d987d5a (diff)
downloadsamba-47082ad3fae086c168bfedaa2fba692eccff3145.tar.gz
samba-47082ad3fae086c168bfedaa2fba692eccff3145.tar.bz2
samba-47082ad3fae086c168bfedaa2fba692eccff3145.zip
libwbclient: Add test for wbcPingDc2
The internal domain used in 'make test' does not report a DC name, so just add tests similar to the old wbcPingDc call. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'nsswitch/libwbclient/tests')
-rw-r--r--nsswitch/libwbclient/tests/wbclient.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c
index d1055747a1..cd44d69262 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -63,6 +63,19 @@ static bool test_wbc_pingdc(struct torture_context *tctx)
return true;
}
+static bool test_wbc_pingdc2(struct torture_context *tctx)
+{
+ char *name = NULL;
+
+ torture_assert_wbc_equal(tctx, wbcPingDc2("random_string", NULL, &name),
+ WBC_ERR_NOT_IMPLEMENTED, "%s",
+ "wbcPingDc2 failed");
+ torture_assert_wbc_ok(tctx, wbcPingDc2(NULL, NULL, &name), "%s",
+ "wbcPingDc2 failed");
+
+ return true;
+}
+
static bool test_wbc_library_details(struct torture_context *tctx)
{
struct wbcLibraryDetails *details;
@@ -688,6 +701,7 @@ struct torture_suite *torture_wbclient(void)
torture_suite_add_simple_test(suite, "wbcPing", test_wbc_ping);
torture_suite_add_simple_test(suite, "wbcPingDc", test_wbc_pingdc);
+ torture_suite_add_simple_test(suite, "wbcPingDc2", test_wbc_pingdc);
torture_suite_add_simple_test(suite, "wbcLibraryDetails", test_wbc_library_details);
torture_suite_add_simple_test(suite, "wbcInterfaceDetails", test_wbc_interface_details);
torture_suite_add_simple_test(suite, "wbcSidTypeString", test_wbc_sidtypestring);