1{
2 "tests": [
3 {
4 "description": "Single IPv4 host without port",
5 "uri": "mongodb://127.0.0.1",
6 "valid": true,
7 "warning": false,
8 "hosts": [
9 {
10 "type": "ipv4",
11 "host": "127.0.0.1",
12 "port": null
13 }
14 ],
15 "auth": null,
16 "options": null
17 },
18 {
19 "description": "Single IPv4 host with port",
20 "uri": "mongodb://127.0.0.1:27018",
21 "valid": true,
22 "warning": false,
23 "hosts": [
24 {
25 "type": "ipv4",
26 "host": "127.0.0.1",
27 "port": 27018
28 }
29 ],
30 "auth": null,
31 "options": null
32 },
33 {
34 "description": "Single IP literal host without port",
35 "uri": "mongodb://[::1]",
36 "valid": true,
37 "warning": false,
38 "hosts": [
39 {
40 "type": "ip_literal",
41 "host": "::1",
42 "port": null
43 }
44 ],
45 "auth": null,
46 "options": null
47 },
48 {
49 "description": "Single IP literal host with port",
50 "uri": "mongodb://[::1]:27019",
51 "valid": true,
52 "warning": false,
53 "hosts": [
54 {
55 "type": "ip_literal",
56 "host": "::1",
57 "port": 27019
58 }
59 ],
60 "auth": null,
61 "options": null
62 },
63 {
64 "description": "Single hostname without port",
65 "uri": "mongodb://example.com",
66 "valid": true,
67 "warning": false,
68 "hosts": [
69 {
70 "type": "hostname",
71 "host": "example.com",
72 "port": null
73 }
74 ],
75 "auth": null,
76 "options": null
77 },
78 {
79 "description": "Single hostname with port",
80 "uri": "mongodb://example.com:27020",
81 "valid": true,
82 "warning": false,
83 "hosts": [
84 {
85 "type": "hostname",
86 "host": "example.com",
87 "port": 27020
88 }
89 ],
90 "auth": null,
91 "options": null
92 },
93 {
94 "description": "Single hostname (resembling IPv4) without port",
95 "uri": "mongodb://256.0.0.1",
96 "valid": true,
97 "warning": false,
98 "hosts": [
99 {
100 "type": "hostname",
101 "host": "256.0.0.1",
102 "port": null
103 }
104 ],
105 "auth": null,
106 "options": null
107 },
108 {
109 "description": "Multiple hosts (mixed formats)",
110 "uri": "mongodb://127.0.0.1,[::1]:27018,example.com:27019",
111 "valid": true,
112 "warning": false,
113 "hosts": [
114 {
115 "type": "ipv4",
116 "host": "127.0.0.1",
117 "port": null
118 },
119 {
120 "type": "ip_literal",
121 "host": "::1",
122 "port": 27018
123 },
124 {
125 "type": "hostname",
126 "host": "example.com",
127 "port": 27019
128 }
129 ],
130 "auth": null,
131 "options": null
132 },
133 {
134 "description": "UTF-8 hosts",
135 "uri": "mongodb://bücher.example.com,umläut.example.com/",
136 "valid": true,
137 "warning": false,
138 "hosts": [
139 {
140 "type": "hostname",
141 "host": "bücher.example.com",
142 "port": null
143 },
144 {
145 "type": "hostname",
146 "host": "umläut.example.com",
147 "port": null
148 }
149 ],
150 "auth": null,
151 "options": null
152 }
153 ]
154}
View as plain text