File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 10
10
*****
11
11
12
12
- Added `ldapsearch ` command. :pr: `4 `
13
+ - The root DN can add schemas. :pr: `5 `
13
14
14
15
[0.1.0] - 2021-04-02
15
16
====================
Original file line number Diff line number Diff line change 29
29
cn: module
30
30
olcModuleLoad: back_%(database)s
31
31
32
+ dn: olcDatabase=config,cn=config
33
+ objectClass: olcDatabaseConfig
34
+ olcDatabase: config
35
+ olcRootDN: %(rootdn)s
36
+
32
37
dn: olcDatabase=%(database)s,cn=config
33
38
objectClass: olcDatabaseConfig
34
39
objectClass: olcMdbConfig
Original file line number Diff line number Diff line change @@ -78,6 +78,42 @@ def test_commands():
78
78
server .stop ()
79
79
80
80
81
+ def test_ldapadd_config_database ():
82
+ server = slapd .Slapd ()
83
+ server .start ()
84
+
85
+ assert "dn: cn={1}myschema,cn=schema,cn=config" not in server .slapcat (
86
+ ["-n0" ]
87
+ ).stdout .decode ("utf-8" )
88
+
89
+ ldif = (
90
+ "dn: cn=myschema,cn=schema,cn=config\n "
91
+ "objectClass: olcSchemaConfig\n "
92
+ "cn: myschema\n "
93
+ "olcAttributeTypes: ( 1.3.6.1.4.1.56207.1.1.1 NAME 'myAttribute'\n "
94
+ " EQUALITY caseExactMatch\n "
95
+ " ORDERING caseExactOrderingMatch\n "
96
+ " SUBSTR caseExactSubstringsMatch\n "
97
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15\n "
98
+ " SINGLE-VALUE\n "
99
+ " USAGE userApplications\n "
100
+ " X-ORIGIN 'mySchema1' )\n "
101
+ "olcObjectClasses: ( 1.3.6.1.4.1.56207.1.1.2 NAME 'myObject'\n "
102
+ " SUP top\n "
103
+ " STRUCTURAL\n "
104
+ " MUST (\n "
105
+ " cn $\n "
106
+ " myAttribute\n "
107
+ " )\n "
108
+ " X-ORIGIN 'mySchema2' )\n "
109
+ )
110
+ server .ldapadd (ldif )
111
+
112
+ assert "dn: cn={1}myschema,cn=schema,cn=config" in server .slapcat (
113
+ ["-n0" ]
114
+ ).stdout .decode ("utf-8" )
115
+
116
+
81
117
def test_return_codes ():
82
118
server = slapd .Slapd ()
83
119
server .start ()
You can’t perform that action at this time.
0 commit comments