tort: RPC-CRACKNAMES test case refactored
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Fri, 28 Aug 2009 15:35:31 +0000 (18:35 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Sep 2009 12:44:50 +0000 (22:44 +1000)
source4/torture/rpc/drsuapi_cracknames.c
source4/torture/rpc/rpc.c

index 42373a8c4f5ed2b2c515d6a4a7f95e5c0f28372b..537788244607bbfa0ed99dab80ab3b5acb94b6b1 100644 (file)
@@ -1002,3 +1002,20 @@ bool test_DsCrackNames(struct torture_context *tctx,
        return test_DsCrackNamesMatrix(tctx, priv, FQDN_1779_name,
                                        user_principal_name, service_principal_name);
 }
+
+/**
+ * CRACKNAMES test suite implementation
+ */
+void torture_rpc_drsuapi_cracknames_tcase(struct torture_suite *suite)
+{
+       typedef bool (*run_func) (struct torture_context *test, void *tcase_data);
+
+       struct torture_test *test;
+       struct torture_tcase *tcase = torture_suite_add_tcase(suite, "CRACKNAMES");
+
+       torture_tcase_set_fixture(tcase,
+                                 torture_rpc_drsuapi_tcase_setup,
+                                 torture_rpc_drsuapi_tcase_teardown);
+
+       test = torture_tcase_add_simple_test(tcase, "CRACKNAMES-TEST", (run_func)test_DsCrackNames);
+}
index 736b0376000f26970c37cb9b818ae87819df62f6..d0448c8d48e459dcafdceb1fefedba0e83df4ba9 100644 (file)
@@ -490,7 +490,7 @@ NTSTATUS torture_rpc_init(void)
        torture_suite_add_simple_test(suite, "SAMBA3-WKSSVC", torture_samba3_rpc_wkssvc);
        torture_suite_add_simple_test(suite, "SAMBA3-WINREG", torture_samba3_rpc_winreg);
        torture_suite_add_simple_test(suite, "DRSUAPI", torture_rpc_drsuapi);
-       torture_suite_add_simple_test(suite, "CRACKNAMES", torture_rpc_drsuapi_cracknames);
+       torture_rpc_drsuapi_cracknames_tcase(suite);
        torture_suite_add_suite(suite, torture_rpc_dssetup(suite));
        torture_suite_add_suite(suite, torture_rpc_browser(suite));
        torture_suite_add_simple_test(suite, "SAMBA3-REGCONFIG", torture_samba3_regconfig);