File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ The ``valid`` and ``warning`` fields are boolean in order to keep the tests
38
38
flexible. We are not concerned with asserting the format of specific error or
39
39
warnings messages strings.
40
40
41
+ Under normal circumstances, it should not be necessary to specify both
42
+ ``valid: false `` and ``warning: true ``. Typically, a URI test case will either
43
+ yield an error (e.g. options conflict) or a warning (e.g. invalid type or value
44
+ for an option), but not both.
45
+
41
46
Use as unit tests
42
47
=================
43
48
Original file line number Diff line number Diff line change 15
15
"description" : " Non-SRV URI with custom srvServiceName" ,
16
16
"uri" : " mongodb://example.com/?srvServiceName=customname" ,
17
17
"valid" : false ,
18
- "warning" : true ,
18
+ "warning" : false ,
19
19
"hosts" : null ,
20
20
"auth" : null ,
21
21
"options" : {}
34
34
{
35
35
"description" : " SRV URI with negative integer for srvMaxHosts" ,
36
36
"uri" : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=-1" ,
37
- "valid" : false ,
37
+ "valid" : true ,
38
38
"warning" : true ,
39
39
"hosts" : null ,
40
40
"auth" : null ,
43
43
{
44
44
"description" : " SRV URI with invalid type for srvMaxHosts" ,
45
45
"uri" : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=foo" ,
46
- "valid" : false ,
46
+ "valid" : true ,
47
47
"warning" : true ,
48
48
"hosts" : null ,
49
49
"auth" : null ,
53
53
"description" : " Non-SRV URI with srvMaxHosts" ,
54
54
"uri" : " mongodb://example.com/?srvMaxHosts=2" ,
55
55
"valid" : false ,
56
- "warning" : true ,
56
+ "warning" : false ,
57
57
"hosts" : null ,
58
58
"auth" : null ,
59
59
"options" : {}
62
62
"description" : " SRV URI with positive srvMaxHosts and replicaSet" ,
63
63
"uri" : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&replicaSet=foo" ,
64
64
"valid" : false ,
65
- "warning" : true ,
65
+ "warning" : false ,
66
66
"hosts" : null ,
67
67
"auth" : null ,
68
68
"options" : {}
71
71
"description" : " SRV URI with positive srvMaxHosts and loadBalanced=true" ,
72
72
"uri" : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&loadBalanced=true" ,
73
73
"valid" : false ,
74
- "warning" : true ,
74
+ "warning" : false ,
75
75
"hosts" : null ,
76
76
"auth" : null ,
77
77
"options" : {}
Original file line number Diff line number Diff line change 10
10
- description : " Non-SRV URI with custom srvServiceName"
11
11
uri : " mongodb://example.com/?srvServiceName=customname"
12
12
valid : false
13
- warning : true
13
+ warning : false
14
14
hosts : ~
15
15
auth : ~
16
16
options : {}
@@ -24,39 +24,39 @@ tests:
24
24
srvMaxHosts : 2
25
25
- description : " SRV URI with negative integer for srvMaxHosts"
26
26
uri : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=-1"
27
- valid : false
27
+ valid : true
28
28
warning : true
29
29
hosts : ~
30
30
auth : ~
31
31
options : {}
32
32
- description : " SRV URI with invalid type for srvMaxHosts"
33
33
uri : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=foo"
34
- valid : false
34
+ valid : true
35
35
warning : true
36
36
hosts : ~
37
37
auth : ~
38
38
options : {}
39
39
- description : " Non-SRV URI with srvMaxHosts"
40
40
uri : " mongodb://example.com/?srvMaxHosts=2"
41
41
valid : false
42
- warning : true
42
+ warning : false
43
43
hosts : ~
44
44
auth : ~
45
45
options : {}
46
46
# Note: Testing URI validation for srvMaxHosts conflicting with either
47
- # loadBalanced=true or # replicaSet specified via TXT records is covered by
47
+ # loadBalanced=true or replicaSet specified via TXT records is covered by
48
48
# the Initial DNS Seedlist Discovery test suite.
49
49
- description : " SRV URI with positive srvMaxHosts and replicaSet"
50
50
uri : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&replicaSet=foo"
51
51
valid : false
52
- warning : true
52
+ warning : false
53
53
hosts : ~
54
54
auth : ~
55
55
options : {}
56
56
- description : " SRV URI with positive srvMaxHosts and loadBalanced=true"
57
57
uri : " mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=2&loadBalanced=true"
58
58
valid : false
59
- warning : true
59
+ warning : false
60
60
hosts : ~
61
61
auth : ~
62
62
options : {}
You can’t perform that action at this time.
0 commit comments