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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
# Copyright (C) 2018-present MongoDB, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the Server Side Public License, version 1,
# as published by MongoDB, Inc.
#
# 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
# Server Side Public License for more details.
#
# You should have received a copy of the Server Side Public License
# along with this program. If not, see
# <http://www.mongodb.com/licensing/server-side-public-license>.
#
# As a special exception, the copyright holders give permission to link the
# code of portions of this program with the OpenSSL library under certain
# conditions as described in each individual source file and distribute
# linked combinations including the program with the OpenSSL library. You
# must comply with the Server Side Public License in all respects for
# all of the code used other than as permitted herein. If you modify file(s)
# with this exception, you may extend this exception to your version of the
# file(s), but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version. If you delete this
# exception statement from all source files in the program, then also delete
# it in the license file.
#
global:
cpp_namespace: "mongo::test"
cpp_includes:
- "mongo/idl/server_parameter_with_storage_test.h"
- "mongo/idl/config_option_test.h"
configs:
initializer: TestConfigs
configs:
"test.config.opt1":
short_name: testConfigOpt1
description: "Basic switch"
arg_vartype: Switch
source: [ cli, yaml, ini ]
"test.config.opt2":
short_name: testConfigOpt2
description: "Boolean option without implicit value"
arg_vartype: Bool
source: cli
"test.config.opt3":
short_name: testConfigOpt3
description: "Boolean option with implicit value"
arg_vartype: Bool
source: cli
implicit: true
"test.config.opt4":
short_name: testConfigOpt4
description: "String option with a default value"
arg_vartype: String
source: cli
default: "Default Value"
"test.config.opt5":
short_name: testConfigOpt5
description: "Int option only settable from INI"
arg_vartype: Int
source: ini
# Positional options must be configured with a "short name" only.
"testConfigOpt6":
description: "Positional string argument"
arg_vartype: String
source: [ cli, ini ]
positional: 1
hidden: true
"testConfigOpt7":
description: "Muilti-value positional string arguments"
arg_vartype: StringVector
source: cli
positional: 2-
hidden: true
"test.config.opt8":
short_name: testConfigOpt8
deprecated_name: [ "test.config.opt8a", "test.config.opt8b" ]
deprecated_short_name: [ testConfigOpt8a, testConfigOpt8b ]
description: "Option with deprecated names"
source: [ cli, yaml ]
arg_vartype: Long
"test.config.opt9":
short_name: testConfigOpt9
description: "Option with dependencies"
arg_vartype: Unsigned
source: [ cli, ini, yaml ]
requires: "test.config.opt9a"
conflicts: "test.config.opt9b"
"test.config.opt9a":
short_name: testConfigOpt9a
description: "Required with opt9"
arg_vartype: Long
source: [ cli, ini, yaml ]
"test.config.opt9b":
short_name: testConfigOpt9b
description: "Conflicts with opt9"
arg_vartype: UnsignedLongLong
source: [ cli, ini, yaml ]
"test.config.opt10a":
short_name: testConfigOpt10a
description: "Integer from 0 to 100 exclusive"
arg_vartype: Int
source: cli
validator:
gt: 0
lt: 100
"test.config.opt10b":
short_name: testConfigOpt10b
description: "Integer from 0 to 100 inclusive"
arg_vartype: Int
source: cli
validator:
gte: 0
lte: 100
"test.config.opt11":
short_name: testConfigOpt11
description: "Odd integer (callback test)"
arg_vartype: Int
source: cli
validator:
callback: "validateOdd"
"test.config.opt12":
short_name: testConfigOpt12
description: "Test declared storage"
arg_vartype: String
source: cli
cpp_vartype: std::string
cpp_varname: gTestConfigOpt12
"test.config.opt13":
description: "Test with single name"
short_name: testConfigOpt13
single_name: o
arg_vartype: String
source: cli
"test.config.opt14":
description: "Test with preprocessor and runtime conditions positive"
short_name: testConfigOpt14
arg_vartype: String
source: cli
cpp_vartype: std::string
cpp_varname: gTestConfigOpt14
condition:
preprocessor: "1 == 1"
expr: gEnableTestConfigOpt14
"test.config.opt15":
description: "Test with runtime condition negative"
short_name: testConfigOpt15
arg_vartype: String
source: cli
cpp_vartype: std::string
cpp_varname: gTestConfigOpt15
condition:
expr: gEnableTestConfigOpt15
"test.config.opt16":
description: "Test redacted configurations"
short_name: testConfigOpt16
deprecated_name:
- test.config.opt16depr
- test.config.opt16depr2
deprecated_short_name:
- testConfigOpt16depr
- testConfigOpt16depr2
arg_vartype: String
source: cli
redact: true
"test.config.opt17":
description: "Test c++ expressions in default, implicit, validator"
short_name: testConfigOpt17
arg_vartype: Int
source: cli
default:
expr: kTestConfigOpt17Default
implicit:
expr: kTestConfigOpt17Implicit
validator:
gte:
expr: kTestConfigOpt17Minimum
is_constexpr: false
lte:
expr: kTestConfigOpt17Maximum
is_constexpr: true
|