summaryrefslogtreecommitdiff
path: root/source4/torture/drs
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-08-13 22:30:39 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-08-15 01:02:33 +0300
commite58aed25fcc2a4f4ed5b4c167fc8f954c5d471f5 (patch)
tree12471d08705dc80137432f20c2c6e0b5214082ea /source4/torture/drs
parentd6ccd4c9daaaf19e9fb4dd16ba8b6599d28ef1d5 (diff)
downloadsamba-e58aed25fcc2a4f4ed5b4c167fc8f954c5d471f5.tar.gz
samba-e58aed25fcc2a4f4ed5b4c167fc8f954c5d471f5.tar.bz2
samba-e58aed25fcc2a4f4ed5b4c167fc8f954c5d471f5.zip
s4-drs-test: Make the two DRS test suite a top-level test suites
so that test cases gets visible with "smbtorture --list"
Diffstat (limited to 'source4/torture/drs')
-rw-r--r--source4/torture/drs/drs_init.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/source4/torture/drs/drs_init.c b/source4/torture/drs/drs_init.c
index 6c1f1a071c..e6b1d612f5 100644
--- a/source4/torture/drs/drs_init.c
+++ b/source4/torture/drs/drs_init.c
@@ -28,30 +28,34 @@
/**
* DRSUAPI tests to be executed remotely
*/
-static struct torture_suite * torture_drs_rpc_suite(TALLOC_CTX *mem_ctx)
+static struct torture_suite * torture_drs_rpc_suite(TALLOC_CTX *mem_ctx,
+ const char *suite_name)
{
- struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "RPC");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, suite_name);
torture_drs_rpc_dssync_tcase(suite);
torture_drs_rpc_dsintid_tcase(suite);
+ suite->description = talloc_strdup(suite,
+ "DRSUAPI RPC Tests Suite");
+
return suite;
}
/**
* DRSUAPI tests to be executed remotely
*/
-static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx)
+static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx,
+ const char *suite_name)
{
- struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "UNIT");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, suite_name);
torture_drs_unit_prefixmap(suite);
torture_drs_unit_schemainfo(suite);
+ suite->description = talloc_strdup(suite,
+ "DRSUAPI Unit Tests Suite");
+
return suite;
}
@@ -60,16 +64,17 @@ static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx)
*/
NTSTATUS torture_drs_init(void)
{
- struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "DRS");
+ struct torture_suite *suite;
+ TALLOC_CTX *mem_ctx = talloc_autofree_context();
- torture_suite_add_suite(suite, torture_drs_rpc_suite(suite));
- torture_suite_add_suite(suite, torture_drs_unit_suite(suite));
-
- suite->description = talloc_strdup(suite,
- "DRSUAPI related tests - Remote and Local");
+ /* register RPC related test cases */
+ suite = torture_drs_rpc_suite(mem_ctx, "DRS-RPC");
+ if (!suite) return NT_STATUS_NO_MEMORY;
+ torture_register_suite(suite);
+ /* register DRS Unit test cases */
+ suite = torture_drs_unit_suite(mem_ctx, "DRS-UNIT");
+ if (!suite) return NT_STATUS_NO_MEMORY;
torture_register_suite(suite);
return NT_STATUS_OK;