@@ -42,6 +42,8 @@ pub enum Error {
42
42
ThreadPanic ( String , Box < dyn Any + Send > ) ,
43
43
#[ error( "Error using multiple sockets with Nested backend" ) ]
44
44
WrongBackendSocket ,
45
+ #[ error( "Invalid cmdline option" ) ]
46
+ InvalidCmdlineOption ,
45
47
#[ error( "Invalid uds file" ) ]
46
48
InvalidUdsFile ,
47
49
}
@@ -217,7 +219,7 @@ mod tests {
217
219
socket_path : String :: from ( "/tmp/vhost.sock" ) . into ( ) ,
218
220
uds_path : None ,
219
221
backend : BackendType :: Nested ,
220
- tcp_port : String :: from ( "12345" ) ,
222
+ tcp_port : None ,
221
223
socket_count : 1 ,
222
224
max_queue_size : DEFAULT_QUEUE_SIZE ,
223
225
} ;
@@ -231,7 +233,7 @@ mod tests {
231
233
socket_path : String :: from ( "/tmp/vhost.sock" ) . into ( ) ,
232
234
uds_path : None ,
233
235
backend : BackendType :: Nested ,
234
- tcp_port : String :: from ( "12345" ) ,
236
+ tcp_port : None ,
235
237
socket_count : 0 ,
236
238
max_queue_size : DEFAULT_QUEUE_SIZE ,
237
239
} ;
@@ -248,7 +250,7 @@ mod tests {
248
250
socket_path : String :: from ( "/tmp/vhost.sock" ) . into ( ) ,
249
251
uds_path : None ,
250
252
backend : BackendType :: Nested ,
251
- tcp_port : String :: from ( "12345" ) ,
253
+ tcp_port : None ,
252
254
socket_count : 2 ,
253
255
max_queue_size : DEFAULT_QUEUE_SIZE ,
254
256
} ;
@@ -265,7 +267,7 @@ mod tests {
265
267
socket_path : String :: from ( "/tmp/vhost.sock" ) . into ( ) ,
266
268
uds_path : None ,
267
269
backend : BackendType :: Network ,
268
- tcp_port : String :: from ( "12345" ) ,
270
+ tcp_port : Some ( String :: from ( "12345" ) ) ,
269
271
socket_count : 1 ,
270
272
max_queue_size : DEFAULT_QUEUE_SIZE ,
271
273
} ;
@@ -279,7 +281,7 @@ mod tests {
279
281
socket_path : String :: from ( "/tmp/vhost.sock" ) . into ( ) ,
280
282
uds_path : None ,
281
283
backend : BackendType :: Network ,
282
- tcp_port : String :: from ( "12345" ) ,
284
+ tcp_port : Some ( String :: from ( "12345" ) ) ,
283
285
socket_count : 2 ,
284
286
max_queue_size : DEFAULT_QUEUE_SIZE ,
285
287
} ;
@@ -310,7 +312,7 @@ mod tests {
310
312
socket_path : String :: from ( "/not_a_dir/vhost.sock" ) . into ( ) ,
311
313
uds_path : None ,
312
314
backend : BackendType :: Network ,
313
- tcp_port : String :: from ( "12345" ) ,
315
+ tcp_port : Some ( String :: from ( "12345" ) ) ,
314
316
socket_count : 1 ,
315
317
max_queue_size : DEFAULT_QUEUE_SIZE ,
316
318
} ;
@@ -338,7 +340,7 @@ mod tests {
338
340
socket_path : PathBuf :: from ( "/tmp/vhost.sock" ) ,
339
341
uds_path : Some ( "/non_existing_dir/test.sock" . to_string ( ) . into ( ) ) ,
340
342
backend : BackendType :: Uds ,
341
- tcp_port : String :: new ( ) ,
343
+ tcp_port : Some ( String :: new ( ) ) ,
342
344
socket_count : 1 ,
343
345
max_queue_size : 128 ,
344
346
} ;
0 commit comments