1{
2 "tests": [
3 {
4 "description": "Unix domain socket (relative path with trailing slash)",
5 "uri": "mongodb://rel%2Fmongodb-27017.sock/",
6 "valid": true,
7 "warning": false,
8 "hosts": [
9 {
10 "type": "unix",
11 "host": "rel/mongodb-27017.sock",
12 "port": null
13 }
14 ],
15 "auth": null,
16 "options": null
17 },
18 {
19 "description": "Unix domain socket (relative path without trailing slash)",
20 "uri": "mongodb://rel%2Fmongodb-27017.sock",
21 "valid": true,
22 "warning": false,
23 "hosts": [
24 {
25 "type": "unix",
26 "host": "rel/mongodb-27017.sock",
27 "port": null
28 }
29 ],
30 "auth": null,
31 "options": null
32 },
33 {
34 "description": "Unix domain socket (relative path with spaces)",
35 "uri": "mongodb://rel%2F %2Fmongodb-27017.sock",
36 "valid": true,
37 "warning": false,
38 "hosts": [
39 {
40 "type": "unix",
41 "host": "rel/ /mongodb-27017.sock",
42 "port": null
43 }
44 ],
45 "auth": null,
46 "options": null
47 },
48 {
49 "description": "Multiple Unix domain sockets (relative paths)",
50 "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock",
51 "valid": true,
52 "warning": false,
53 "hosts": [
54 {
55 "type": "unix",
56 "host": "rel/mongodb-27017.sock",
57 "port": null
58 },
59 {
60 "type": "unix",
61 "host": "rel/mongodb-27018.sock",
62 "port": null
63 }
64 ],
65 "auth": null,
66 "options": null
67 },
68 {
69 "description": "Multiple Unix domain sockets (relative and absolute paths)",
70 "uri": "mongodb://rel%2Fmongodb-27017.sock,%2Ftmp%2Fmongodb-27018.sock",
71 "valid": true,
72 "warning": false,
73 "hosts": [
74 {
75 "type": "unix",
76 "host": "rel/mongodb-27017.sock",
77 "port": null
78 },
79 {
80 "type": "unix",
81 "host": "/tmp/mongodb-27018.sock",
82 "port": null
83 }
84 ],
85 "auth": null,
86 "options": null
87 },
88 {
89 "description": "Multiple hosts (relative path and ipv4)",
90 "uri": "mongodb://127.0.0.1:27017,rel%2Fmongodb-27017.sock",
91 "valid": true,
92 "warning": false,
93 "hosts": [
94 {
95 "type": "ipv4",
96 "host": "127.0.0.1",
97 "port": 27017
98 },
99 {
100 "type": "unix",
101 "host": "rel/mongodb-27017.sock",
102 "port": null
103 }
104 ],
105 "auth": null,
106 "options": null
107 },
108 {
109 "description": "Multiple hosts (relative path and hostname resembling relative path)",
110 "uri": "mongodb://mongodb-27017.sock,rel%2Fmongodb-27018.sock",
111 "valid": true,
112 "warning": false,
113 "hosts": [
114 {
115 "type": "hostname",
116 "host": "mongodb-27017.sock",
117 "port": null
118 },
119 {
120 "type": "unix",
121 "host": "rel/mongodb-27018.sock",
122 "port": null
123 }
124 ],
125 "auth": null,
126 "options": null
127 },
128 {
129 "description": "Unix domain socket with auth database (relative path)",
130 "uri": "mongodb://alice:foo@rel%2Fmongodb-27017.sock/admin",
131 "valid": true,
132 "warning": false,
133 "hosts": [
134 {
135 "type": "unix",
136 "host": "rel/mongodb-27017.sock",
137 "port": null
138 }
139 ],
140 "auth": {
141 "username": "alice",
142 "password": "foo",
143 "db": "admin"
144 },
145 "options": null
146 },
147 {
148 "description": "Unix domain socket with path resembling socket file (relative path with trailing slash)",
149 "uri": "mongodb://rel%2Fpath.to.sock%2Fmongodb-27017.sock/",
150 "valid": true,
151 "warning": false,
152 "hosts": [
153 {
154 "type": "unix",
155 "host": "rel/path.to.sock/mongodb-27017.sock",
156 "port": null
157 }
158 ],
159 "auth": null,
160 "options": null
161 },
162 {
163 "description": "Unix domain socket with path resembling socket file (relative path without trailing slash)",
164 "uri": "mongodb://rel%2Fpath.to.sock%2Fmongodb-27017.sock",
165 "valid": true,
166 "warning": false,
167 "hosts": [
168 {
169 "type": "unix",
170 "host": "rel/path.to.sock/mongodb-27017.sock",
171 "port": null
172 }
173 ],
174 "auth": null,
175 "options": null
176 },
177 {
178 "description": "Unix domain socket with path resembling socket file and auth (relative path)",
179 "uri": "mongodb://bob:bar@rel%2Fpath.to.sock%2Fmongodb-27017.sock/admin",
180 "valid": true,
181 "warning": false,
182 "hosts": [
183 {
184 "type": "unix",
185 "host": "rel/path.to.sock/mongodb-27017.sock",
186 "port": null
187 }
188 ],
189 "auth": {
190 "username": "bob",
191 "password": "bar",
192 "db": "admin"
193 },
194 "options": null
195 },
196 {
197 "description": "Multiple Unix domain sockets and auth DB resembling a socket (relative path)",
198 "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin",
199 "valid": true,
200 "warning": false,
201 "hosts": [
202 {
203 "type": "unix",
204 "host": "rel/mongodb-27017.sock",
205 "port": null
206 },
207 {
208 "type": "unix",
209 "host": "rel/mongodb-27018.sock",
210 "port": null
211 }
212 ],
213 "auth": {
214 "username": null,
215 "password": null,
216 "db": "admin"
217 },
218 "options": null
219 },
220 {
221 "description": "Multiple Unix domain sockets with auth DB resembling a path (relative path)",
222 "uri": "mongodb://rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin",
223 "valid": true,
224 "warning": false,
225 "hosts": [
226 {
227 "type": "unix",
228 "host": "rel/mongodb-27017.sock",
229 "port": null
230 },
231 {
232 "type": "unix",
233 "host": "rel/mongodb-27018.sock",
234 "port": null
235 }
236 ],
237 "auth": {
238 "username": null,
239 "password": null,
240 "db": "admin"
241 },
242 "options": null
243 },
244 {
245 "description": "Multiple Unix domain sockets with auth and query string (relative path)",
246 "uri": "mongodb://bob:bar@rel%2Fmongodb-27017.sock,rel%2Fmongodb-27018.sock/admin?w=1",
247 "valid": true,
248 "warning": false,
249 "hosts": [
250 {
251 "type": "unix",
252 "host": "rel/mongodb-27017.sock",
253 "port": null
254 },
255 {
256 "type": "unix",
257 "host": "rel/mongodb-27018.sock",
258 "port": null
259 }
260 ],
261 "auth": {
262 "username": "bob",
263 "password": "bar",
264 "db": "admin"
265 },
266 "options": {
267 "w": 1
268 }
269 }
270 ]
271}
View as plain text