diff options
Diffstat (limited to 'source4/torture/local')
-rw-r--r-- | source4/torture/local/torture.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/source4/torture/local/torture.c b/source4/torture/local/torture.c index b57361bc8d..0c9931be03 100644 --- a/source4/torture/local/torture.c +++ b/source4/torture/local/torture.c @@ -24,7 +24,7 @@ #include "system/wait.h" #include "lib/events/events.h" #include "libcli/raw/libcliraw.h" -#include "torture/util.h" +#include "torture/util_provision.h" static bool test_tempdir(struct torture_context *tctx) { @@ -39,12 +39,47 @@ static bool test_tempdir(struct torture_context *tctx) return true; } +static bool test_provision(struct torture_context *tctx) +{ + NTSTATUS status; + struct provision_settings settings; + + settings.dns_name = "example.com"; + settings.site_name = "SOME-SITE-NAME"; + settings.root_dn_str = "DC=EXAMPLE,DC=COM"; + settings.domain_dn_str = "DC=EXAMPLE,DC=COM"; + settings.config_dn_str = NULL; + settings.schema_dn_str = NULL; + settings.invocation_id = NULL; + settings.netbios_name = "FOO"; + settings.realm = "EXAMPLE.COM"; + settings.domain = "EXAMPLE"; + settings.ntds_guid = NULL; + settings.ntds_dn_str = NULL; + settings.machine_password = "geheim"; + settings.samdb_ldb = NULL; + settings.secrets_ldb = NULL; + settings.secrets_keytab = NULL; + settings.schemadn_ldb = NULL; + settings.configdn_ldb = NULL; + settings.domaindn_ldb = NULL; + settings.templates_ldb = NULL; + settings.dns_keytab = NULL; + + status = provision_bare(tctx, tctx->lp_ctx, &settings); + + torture_assert_ntstatus_ok(tctx, status, "provision"); + + return true; +} + struct torture_suite *torture_local_torture(TALLOC_CTX *mem_ctx) { struct torture_suite *suite = torture_suite_create(mem_ctx, "TORTURE"); torture_suite_add_simple_test(suite, "tempdir", test_tempdir); + torture_suite_add_simple_test(suite, "provision", test_provision); return suite; } |