blob: 6e6c4aac57a87fcfb25b592a5b4ee3c9a6f797fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
/*
Unix SMB/CIFS implementation.
DRSUAPI prefixMap unit tests
Copyright (C) Kamen Mazdrashki <kamen.mazdrashki@postpath.com> 2009
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
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
#include "torture/smbtorture.h"
#include "torture/rpc/drsuapi.h"
#include "dsdb/samdb/samdb.h"
/**
* Private data to be shared among all test in Test case
*/
struct drsut_prefixmap_data {
struct dsdb_schema_prefixmap *prefixmap;
};
/**
* Initial prefix map creation function
*
*/
static struct dsdb_schema_prefixmap * _drsut_prefixmap_new(struct torture_context *tctx)
{
return NULL;
}
/*
* Setup/Teardown for test case
*/
static bool torture_drs_unit_prefixmap_setup(struct torture_context *tctx, struct drsut_prefixmap_data **priv)
{
*priv = talloc_zero(tctx, struct drsut_prefixmap_data);
(*priv)->prefixmap = _drsut_prefixmap_new(tctx);
return true;
}
static bool torture_drs_unit_prefixmap_teardown(struct torture_context *tctx, struct drsut_prefixmap_data *priv)
{
return true;
}
/**
* Test case initialization for
* DRS-UNIT.prefixMap
*/
struct torture_tcase * torture_drs_unit_prefixmap(struct torture_suite *suite)
{
typedef bool (*pfn_setup)(struct torture_context *, void **);
typedef bool (*pfn_teardown)(struct torture_context *, void *);
struct torture_tcase * tc = torture_suite_add_tcase(suite, "prefixMap");
torture_tcase_set_fixture(tc,
(pfn_setup)torture_drs_unit_prefixmap_setup,
(pfn_teardown)torture_drs_unit_prefixmap_teardown);
tc->description = talloc_strdup(tc, "Unit tests for DRSUAPI::prefixMap implementation");
return tc;
}
|