s4-smbtorture: add test for wbcPingDc to WINBIND-WBCLIENT testsuite.
authorGünther Deschner <gd@samba.org>
Fri, 22 Jan 2010 14:06:50 +0000 (15:06 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 25 Jan 2010 10:20:06 +0000 (11:20 +0100)
Volker, please check, you know best how this interface is designed :-)

Guenther

nsswitch/libwbclient/tests/wbclient.c

index 23fad630254723b0245e5c263d4ed2e86b243b82..e0b436962e04bd9d5e9d6678ddf86de9bf3ddc6b 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Unix SMB/CIFS implementation.
    SMB torture tester
-   Copyright (C) Guenther Deschner 2009
+   Copyright (C) Guenther Deschner 2009-2010
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -43,6 +43,16 @@ static bool test_wbc_ping(struct torture_context *tctx)
        return true;
 }
 
+static bool test_wbc_pingdc(struct torture_context *tctx)
+{
+       torture_assert_wbc_equal(tctx, wbcPingDc("random_string", NULL), WBC_ERR_NOT_IMPLEMENTED,
+               "wbcPingDc failed");
+       torture_assert_wbc_ok(tctx, wbcPingDc(NULL, NULL),
+               "wbcPingDc failed");
+
+       return true;
+}
+
 static bool test_wbc_library_details(struct torture_context *tctx)
 {
        struct wbcLibraryDetails *details;
@@ -310,6 +320,7 @@ struct torture_suite *torture_wbclient(void)
        struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "WBCLIENT");
 
        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, "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);