File tree Expand file tree Collapse file tree 11 files changed +138
-20
lines changed Expand file tree Collapse file tree 11 files changed +138
-20
lines changed Original file line number Diff line number Diff line change 162
162
"auth" : null ,
163
163
"options" : null
164
164
},
165
- {
166
- "description" : " Missing delimiting slash between hosts and options" ,
167
- "uri" : " mongodb://example.com?w=1" ,
168
- "valid" : false ,
169
- "warning" : null ,
170
- "hosts" : null ,
171
- "auth" : null ,
172
- "options" : null
173
- },
174
165
{
175
166
"description" : " Incomplete key value pair for option" ,
176
167
"uri" : " mongodb://example.com/?w" ,
Original file line number Diff line number Diff line change @@ -143,14 +143,6 @@ tests:
143
143
hosts : ~
144
144
auth : ~
145
145
options : ~
146
- -
147
- description : " Missing delimiting slash between hosts and options"
148
- uri : " mongodb://example.com?w=1"
149
- valid : false
150
- warning : ~
151
- hosts : ~
152
- auth : ~
153
- options : ~
154
146
-
155
147
description : " Incomplete key value pair for option"
156
148
uri : " mongodb://example.com/?w"
Original file line number Diff line number Diff line change 20
20
"options" : {
21
21
"authmechanism" : " MONGODB-CR"
22
22
}
23
+ },
24
+ {
25
+ "description" : " Missing delimiting slash between hosts and options" ,
26
+ "uri" : " mongodb://example.com?tls=true" ,
27
+ "valid" : true ,
28
+ "warning" : false ,
29
+ "hosts" : [
30
+ {
31
+ "type" : " hostname" ,
32
+ "host" : " example.com" ,
33
+ "port" : null
34
+ }
35
+ ],
36
+ "auth" : null ,
37
+ "options" : {
38
+ "tls" : true
39
+ }
23
40
}
24
41
]
25
42
}
Original file line number Diff line number Diff line change @@ -15,3 +15,16 @@ tests:
15
15
db : " admin"
16
16
options :
17
17
authmechanism : " MONGODB-CR"
18
+ -
19
+ description : " Missing delimiting slash between hosts and options"
20
+ uri : " mongodb://example.com?tls=true"
21
+ valid : true
22
+ warning : false
23
+ hosts :
24
+ -
25
+ type : " hostname"
26
+ host : " example.com"
27
+ port : ~
28
+ auth : ~
29
+ options :
30
+ tls : true
Original file line number Diff line number Diff line change 30
30
"auth" : null ,
31
31
"options" : null
32
32
},
33
+ {
34
+ "description" : " Unix domain socket (mixed case)" ,
35
+ "uri" : " mongodb://%2Ftmp%2FMongoDB-27017.sock" ,
36
+ "valid" : true ,
37
+ "warning" : false ,
38
+ "hosts" : [
39
+ {
40
+ "type" : " unix" ,
41
+ "host" : " /tmp/MongoDB-27017.sock" ,
42
+ "port" : null
43
+ }
44
+ ],
45
+ "auth" : null ,
46
+ "options" : null
47
+ },
33
48
{
34
49
"description" : " Unix domain socket (absolute path with spaces in path)" ,
35
50
"uri" : " mongodb://%2Ftmp%2F %2Fmongodb-27017.sock" ,
Original file line number Diff line number Diff line change @@ -23,6 +23,18 @@ tests:
23
23
port : ~
24
24
auth : ~
25
25
options : ~
26
+ -
27
+ description : " Unix domain socket (mixed case)"
28
+ uri : " mongodb://%2Ftmp%2FMongoDB-27017.sock"
29
+ valid : true
30
+ warning : false
31
+ hosts :
32
+ -
33
+ type : " unix"
34
+ host : " /tmp/MongoDB-27017.sock"
35
+ port : ~
36
+ auth : ~
37
+ options : ~
26
38
-
27
39
description : " Unix domain socket (absolute path with spaces in path)"
28
40
uri : " mongodb://%2Ftmp%2F %2Fmongodb-27017.sock"
Original file line number Diff line number Diff line change 30
30
"auth" : null ,
31
31
"options" : null
32
32
},
33
+ {
34
+ "description" : " Unix domain socket (mixed case)" ,
35
+ "uri" : " mongodb://rel%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
+ },
33
48
{
34
49
"description" : " Unix domain socket (relative path with spaces)" ,
35
50
"uri" : " mongodb://rel%2F %2Fmongodb-27017.sock" ,
Original file line number Diff line number Diff line change @@ -23,6 +23,18 @@ tests:
23
23
port : ~
24
24
auth : ~
25
25
options : ~
26
+ -
27
+ description : " Unix domain socket (mixed case)"
28
+ uri : " mongodb://rel%2FMongoDB-27017.sock"
29
+ valid : true
30
+ warning : false
31
+ hosts :
32
+ -
33
+ type : " unix"
34
+ host : " rel/MongoDB-27017.sock"
35
+ port : ~
36
+ auth : ~
37
+ options : ~
26
38
-
27
39
description : " Unix domain socket (relative path with spaces)"
28
40
uri : " mongodb://rel%2F %2Fmongodb-27017.sock"
Original file line number Diff line number Diff line change 63
63
"options" : {
64
64
"wtimeoutms" : 10
65
65
}
66
+ },
67
+ {
68
+ "description" : " Empty integer option values are ignored" ,
69
+ "uri" : " mongodb://localhost/?maxIdleTimeMS=" ,
70
+ "valid" : true ,
71
+ "warning" : true ,
72
+ "hosts" : [
73
+ {
74
+ "type" : " hostname" ,
75
+ "host" : " localhost" ,
76
+ "port" : null
77
+ }
78
+ ],
79
+ "auth" : null ,
80
+ "options" : null
81
+ },
82
+ {
83
+ "description" : " Empty boolean option value are ignored" ,
84
+ "uri" : " mongodb://localhost/?journal=" ,
85
+ "valid" : true ,
86
+ "warning" : true ,
87
+ "hosts" : [
88
+ {
89
+ "type" : " hostname" ,
90
+ "host" : " localhost" ,
91
+ "port" : null
92
+ }
93
+ ],
94
+ "auth" : null ,
95
+ "options" : null
66
96
}
67
97
]
68
98
}
Original file line number Diff line number Diff line change @@ -49,3 +49,27 @@ tests:
49
49
auth : ~
50
50
options :
51
51
wtimeoutms : 10
52
+ -
53
+ description : " Empty integer option values are ignored"
54
+ uri : " mongodb://localhost/?maxIdleTimeMS="
55
+ valid : true
56
+ warning : true
57
+ hosts :
58
+ -
59
+ type : " hostname"
60
+ host : " localhost"
61
+ port : ~
62
+ auth : ~
63
+ options : ~
64
+ -
65
+ description : " Empty boolean option value are ignored"
66
+ uri : " mongodb://localhost/?journal="
67
+ valid : true
68
+ warning : true
69
+ hosts :
70
+ -
71
+ type : " hostname"
72
+ host : " localhost"
73
+ port : ~
74
+ auth : ~
75
+ options : ~
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ import { loadSpecTests } from '../spec';
4
4
import { executeUriValidationTest } from '../tools/uri_spec_runner' ;
5
5
6
6
const skipTests = [
7
- // TODO(NODE-3919): fix to match expected behavior
8
- 'Missing delimiting slash between hosts and options' ,
9
-
10
7
// TODO(NODE-3914): Fix; note that wtimeoutms will be deprecated via DRIVERS-555 (NODE-3078)
11
8
'Deprecated (or unknown) options are ignored if replacement exists'
12
9
] ;
You can’t perform that action at this time.
0 commit comments