Skip to content

Commit fe1f905

Browse files
Merge URI options tests into existing files
Co-Authored-By: [email protected] <[email protected]>
1 parent 842c4e1 commit fe1f905

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed

source/uri-options/tests/connection-options.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,15 @@ tests:
217217
auth: ~
218218
options:
219219
timeoutMS: 0
220+
-
221+
description: "timeoutMS with valid integer value"
222+
uri: "mongodb://example.com/?timeoutMS=5000"
223+
valid: true
224+
warning: false
225+
hosts: ~
226+
auth: ~
227+
options:
228+
timeoutMS: 5000
220229
-
221230
description: "Non-numeric timeoutMS causes a warning"
222231
uri: "mongodb://example.com/?timeoutMS=invalid"
@@ -233,3 +242,11 @@ tests:
233242
hosts: ~
234243
auth: ~
235244
options: ~
245+
-
246+
description: "timeoutMS with negative value causes a warning"
247+
uri: "mongodb://example.com/?timeoutMS=-1000"
248+
valid: true
249+
warning: true
250+
hosts: ~
251+
auth: ~
252+
options: ~

source/uri-options/tests/proxy-options.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,67 @@ tests:
119119
hosts: ~
120120
auth: ~
121121
options: {}
122+
-
123+
description: "proxyHost with SRV URI"
124+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyHost=proxy.example.com"
125+
valid: true
126+
warning: false
127+
hosts: ~
128+
auth: ~
129+
options:
130+
proxyHost: "proxy.example.com"
131+
-
132+
description: "proxyPort with SRV URI"
133+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyPort=1080"
134+
valid: true
135+
warning: false
136+
hosts: ~
137+
auth: ~
138+
options:
139+
proxyPort: 1080
140+
-
141+
description: "proxyUsername with SRV URI"
142+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyUsername=user"
143+
valid: true
144+
warning: false
145+
hosts: ~
146+
auth: ~
147+
options:
148+
proxyUsername: "user"
149+
-
150+
description: "proxyPassword with SRV URI"
151+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyPassword=password"
152+
valid: true
153+
warning: false
154+
hosts: ~
155+
auth: ~
156+
options:
157+
proxyPassword: "password"
158+
-
159+
description: "invalid proxyPort with SRV URI causes a warning"
160+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyPort=invalid"
161+
valid: true
162+
warning: true
163+
hosts: ~
164+
auth: ~
165+
options: ~
166+
-
167+
description: "negative proxyPort with SRV URI causes a warning"
168+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyPort=-1"
169+
valid: true
170+
warning: true
171+
hosts: ~
172+
auth: ~
173+
options: ~
174+
-
175+
description: "complete proxy configuration with SRV URI"
176+
uri: "mongodb+srv://test1.test.build.10gen.cc/?proxyHost=proxy.example.com&proxyPort=1080&proxyUsername=user&proxyPassword=password"
177+
valid: true
178+
warning: false
179+
hosts: ~
180+
auth: ~
181+
options:
182+
proxyHost: "proxy.example.com"
183+
proxyPort: 1080
184+
proxyUsername: "user"
185+
proxyPassword: "password"

source/uri-options/tests/sdam-options.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,38 @@ tests:
3333
hosts: ~
3434
auth: ~
3535
options: ~
36+
37+
- description: "serverMonitoringMode=auto with SRV URI"
38+
uri: "mongodb+srv://test1.test.build.10gen.cc/?serverMonitoringMode=auto"
39+
valid: true
40+
warning: false
41+
hosts: ~
42+
auth: ~
43+
options:
44+
serverMonitoringMode: "auto"
45+
46+
- description: "serverMonitoringMode=stream with SRV URI"
47+
uri: "mongodb+srv://test1.test.build.10gen.cc/?serverMonitoringMode=stream"
48+
valid: true
49+
warning: false
50+
hosts: ~
51+
auth: ~
52+
options:
53+
serverMonitoringMode: "stream"
54+
55+
- description: "serverMonitoringMode=poll with SRV URI"
56+
uri: "mongodb+srv://test1.test.build.10gen.cc/?serverMonitoringMode=poll"
57+
valid: true
58+
warning: false
59+
hosts: ~
60+
auth: ~
61+
options:
62+
serverMonitoringMode: "poll"
63+
64+
- description: "invalid serverMonitoringMode with SRV URI"
65+
uri: "mongodb+srv://test1.test.build.10gen.cc/?serverMonitoringMode=invalid"
66+
valid: true
67+
warning: true
68+
hosts: ~
69+
auth: ~
70+
options: ~

0 commit comments

Comments
 (0)