1{
2 "tests": [
3 {
4 "description": "Valid read and write concern are parsed correctly",
5 "uri": "mongodb://example.com/?readConcernLevel=majority&w=5&wTimeoutMS=30000&journal=false",
6 "valid": true,
7 "warning": false,
8 "hosts": null,
9 "auth": null,
10 "options": {
11 "readConcernLevel": "majority",
12 "w": 5,
13 "wTimeoutMS": 30000,
14 "journal": false
15 }
16 },
17 {
18 "description": "Arbitrary string readConcernLevel does not cause a warning",
19 "uri": "mongodb://example.com/?readConcernLevel=arbitraryButStillValid",
20 "valid": true,
21 "warning": false,
22 "hosts": null,
23 "auth": null,
24 "options": {
25 "readConcernLevel": "arbitraryButStillValid"
26 }
27 },
28 {
29 "description": "Arbitrary string w doesn't cause a warning",
30 "uri": "mongodb://example.com/?w=arbitraryButStillValid",
31 "valid": true,
32 "warning": false,
33 "hosts": null,
34 "auth": null,
35 "options": {
36 "w": "arbitraryButStillValid"
37 }
38 },
39 {
40 "description": "Too low w causes a warning",
41 "uri": "mongodb://example.com/?w=-2",
42 "valid": true,
43 "warning": true,
44 "hosts": null,
45 "auth": null,
46 "options": {}
47 },
48 {
49 "description": "Non-numeric wTimeoutMS causes a warning",
50 "uri": "mongodb://example.com/?wTimeoutMS=invalid",
51 "valid": true,
52 "warning": true,
53 "hosts": null,
54 "auth": null,
55 "options": {}
56 },
57 {
58 "description": "Too low wTimeoutMS causes a warning",
59 "uri": "mongodb://example.com/?wTimeoutMS=-2",
60 "valid": true,
61 "warning": true,
62 "hosts": null,
63 "auth": null,
64 "options": {}
65 },
66 {
67 "description": "Invalid journal causes a warning",
68 "uri": "mongodb://example.com/?journal=invalid",
69 "valid": true,
70 "warning": true,
71 "hosts": null,
72 "auth": null,
73 "options": {}
74 }
75 ]
76}
View as plain text