1{
2 "tests": [
3 {
4 "description": "Empty string",
5 "uri": "",
6 "valid": false,
7 "warning": null,
8 "hosts": null,
9 "auth": null,
10 "options": null
11 },
12 {
13 "description": "Invalid scheme",
14 "uri": "mongo://localhost:27017",
15 "valid": false,
16 "warning": null,
17 "hosts": null,
18 "auth": null,
19 "options": null
20 },
21 {
22 "description": "Missing host",
23 "uri": "mongodb://",
24 "valid": false,
25 "warning": null,
26 "hosts": null,
27 "auth": null,
28 "options": null
29 },
30 {
31 "description": "Double colon in host identifier",
32 "uri": "mongodb://localhost::27017",
33 "valid": false,
34 "warning": null,
35 "hosts": null,
36 "auth": null,
37 "options": null
38 },
39 {
40 "description": "Double colon in host identifier and trailing slash",
41 "uri": "mongodb://localhost::27017/",
42 "valid": false,
43 "warning": null,
44 "hosts": null,
45 "auth": null,
46 "options": null
47 },
48 {
49 "description": "Double colon in host identifier with missing host and port",
50 "uri": "mongodb://::",
51 "valid": false,
52 "warning": null,
53 "hosts": null,
54 "auth": null,
55 "options": null
56 },
57 {
58 "description": "Double colon in host identifier with missing port",
59 "uri": "mongodb://localhost,localhost::",
60 "valid": false,
61 "warning": null,
62 "hosts": null,
63 "auth": null,
64 "options": null
65 },
66 {
67 "description": "Double colon in host identifier and second host",
68 "uri": "mongodb://localhost::27017,abc",
69 "valid": false,
70 "warning": null,
71 "hosts": null,
72 "auth": null,
73 "options": null
74 },
75 {
76 "description": "Invalid port (negative number) with hostname",
77 "uri": "mongodb://localhost:-1",
78 "valid": false,
79 "warning": null,
80 "hosts": null,
81 "auth": null,
82 "options": null
83 },
84 {
85 "description": "Invalid port (zero) with hostname",
86 "uri": "mongodb://localhost:0/",
87 "valid": false,
88 "warning": null,
89 "hosts": null,
90 "auth": null,
91 "options": null
92 },
93 {
94 "description": "Invalid port (positive number) with hostname",
95 "uri": "mongodb://localhost:65536",
96 "valid": false,
97 "warning": null,
98 "hosts": null,
99 "auth": null,
100 "options": null
101 },
102 {
103 "description": "Invalid port (positive number) with hostname and trailing slash",
104 "uri": "mongodb://localhost:65536/",
105 "valid": false,
106 "warning": null,
107 "hosts": null,
108 "auth": null,
109 "options": null
110 },
111 {
112 "description": "Invalid port (non-numeric string) with hostname",
113 "uri": "mongodb://localhost:foo",
114 "valid": false,
115 "warning": null,
116 "hosts": null,
117 "auth": null,
118 "options": null
119 },
120 {
121 "description": "Invalid port (negative number) with IP literal",
122 "uri": "mongodb://[::1]:-1",
123 "valid": false,
124 "warning": null,
125 "hosts": null,
126 "auth": null,
127 "options": null
128 },
129 {
130 "description": "Invalid port (zero) with IP literal",
131 "uri": "mongodb://[::1]:0/",
132 "valid": false,
133 "warning": null,
134 "hosts": null,
135 "auth": null,
136 "options": null
137 },
138 {
139 "description": "Invalid port (positive number) with IP literal",
140 "uri": "mongodb://[::1]:65536",
141 "valid": false,
142 "warning": null,
143 "hosts": null,
144 "auth": null,
145 "options": null
146 },
147 {
148 "description": "Invalid port (positive number) with IP literal and trailing slash",
149 "uri": "mongodb://[::1]:65536/",
150 "valid": false,
151 "warning": null,
152 "hosts": null,
153 "auth": null,
154 "options": null
155 },
156 {
157 "description": "Invalid port (non-numeric string) with IP literal",
158 "uri": "mongodb://[::1]:foo",
159 "valid": false,
160 "warning": null,
161 "hosts": null,
162 "auth": null,
163 "options": null
164 },
165 {
166 "description": "Missing delimiting slash between hosts and options",
167 "uri": "mongodb://example.com?w=1",
168 "valid": false,
169 "warning": null,
170 "hosts": null,
171 "auth": null,
172 "options": null
173 },
174 {
175 "description": "Incomplete key value pair for option",
176 "uri": "mongodb://example.com/?w",
177 "valid": false,
178 "warning": null,
179 "hosts": null,
180 "auth": null,
181 "options": null
182 },
183 {
184 "description": "Username with password containing an unescaped colon",
185 "uri": "mongodb://alice:foo:bar@127.0.0.1",
186 "valid": false,
187 "warning": null,
188 "hosts": null,
189 "auth": null,
190 "options": null
191 },
192 {
193 "description": "Username containing an unescaped at-sign",
194 "uri": "mongodb://alice@@127.0.0.1",
195 "valid": false,
196 "warning": null,
197 "hosts": null,
198 "auth": null,
199 "options": null
200 },
201 {
202 "description": "Username with password containing an unescaped at-sign",
203 "uri": "mongodb://alice@foo:bar@127.0.0.1",
204 "valid": false,
205 "warning": null,
206 "hosts": null,
207 "auth": null,
208 "options": null
209 },
210 {
211 "description": "Username containing an unescaped slash",
212 "uri": "mongodb://alice/@localhost/db",
213 "valid": false,
214 "warning": null,
215 "hosts": null,
216 "auth": null,
217 "options": null
218 },
219 {
220 "description": "Username containing unescaped slash with password",
221 "uri": "mongodb://alice/bob:foo@localhost/db",
222 "valid": false,
223 "warning": null,
224 "hosts": null,
225 "auth": null,
226 "options": null
227 },
228 {
229 "description": "Username with password containing an unescaped slash",
230 "uri": "mongodb://alice:foo/bar@localhost/db",
231 "valid": false,
232 "warning": null,
233 "hosts": null,
234 "auth": null,
235 "options": null
236 },
237 {
238 "description": "Host with unescaped slash",
239 "uri": "mongodb:///tmp/mongodb-27017.sock/",
240 "valid": false,
241 "warning": null,
242 "hosts": null,
243 "auth": null,
244 "options": null
245 },
246 {
247 "description": "mongodb+srv with multiple service names",
248 "uri": "mongodb+srv://test5.test.mongodb.com,test6.test.mongodb.com",
249 "valid": false,
250 "warning": null,
251 "hosts": null,
252 "auth": null,
253 "options": null
254 },
255 {
256 "description": "mongodb+srv with port number",
257 "uri": "mongodb+srv://test7.test.mongodb.com:27018",
258 "valid": false,
259 "warning": null,
260 "hosts": null,
261 "auth": null,
262 "options": null
263 },
264 {
265 "description": "Username with password containing an unescaped percent sign",
266 "uri": "mongodb://alice%foo:bar@127.0.0.1",
267 "valid": false,
268 "warning": null,
269 "hosts": null,
270 "auth": null,
271 "options": null
272 }
273 ]
274}
View as plain text