@@ -332,7 +332,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
332
332
cmd : []string {"mongo" ,
333
333
"--ssl" ,
334
334
"--sslPEMKeyFile" , "/tmp/keys/example.com/bob-db/db.example.com/mysql.crt" ,
335
- "mongodb://localhost:12345/mydb?serverSelectionTimeoutMS=5000" ,
335
+ "mongodb://localhost:12345/mydb?directConnection=true& serverSelectionTimeoutMS=5000" ,
336
336
},
337
337
wantErr : false ,
338
338
},
@@ -347,7 +347,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
347
347
},
348
348
},
349
349
cmd : []string {"mongo" ,
350
- "mongodb://localhost:12345/mydb?serverSelectionTimeoutMS=5000" ,
350
+ "mongodb://localhost:12345/mydb?directConnection=true& serverSelectionTimeoutMS=5000" ,
351
351
},
352
352
wantErr : false ,
353
353
},
@@ -365,7 +365,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
365
365
"--tls" ,
366
366
"--tlsCertificateKeyFile" , "/tmp/keys/example.com/bob-db/db.example.com/mysql.crt" ,
367
367
"--tlsUseSystemCA" ,
368
- "mongodb://localhost:12345/mydb?serverSelectionTimeoutMS=5000" ,
368
+ "mongodb://localhost:12345/mydb?directConnection=true& serverSelectionTimeoutMS=5000" ,
369
369
},
370
370
},
371
371
{
@@ -385,7 +385,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
385
385
"--tls" ,
386
386
"--tlsCertificateKeyFile" , "/tmp/keys/example.com/bob-db/db.example.com/mysql.crt" ,
387
387
"--tlsCAFile" , "/tmp/keys/example.com/cas/example.com.pem" ,
388
- "mongodb://localhost:12345/mydb?serverSelectionTimeoutMS=5000" ,
388
+ "mongodb://localhost:12345/mydb?directConnection=true& serverSelectionTimeoutMS=5000" ,
389
389
},
390
390
},
391
391
{
@@ -399,7 +399,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
399
399
},
400
400
},
401
401
cmd : []string {"mongosh" ,
402
- "mongodb://localhost:12345/mydb?serverSelectionTimeoutMS=5000" ,
402
+ "mongodb://localhost:12345/mydb?directConnection=true& serverSelectionTimeoutMS=5000" ,
403
403
},
404
404
},
405
405
{
@@ -411,7 +411,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
411
411
execOutput : map [string ][]byte {}, // Cannot find either bin.
412
412
},
413
413
cmd : []string {"mongosh" ,
414
- "mongodb://localhost:12345/mydb?serverSelectionTimeoutMS=5000" ,
414
+ "mongodb://localhost:12345/mydb?directConnection=true& serverSelectionTimeoutMS=5000" ,
415
415
},
416
416
},
417
417
{
@@ -427,7 +427,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
427
427
},
428
428
},
429
429
cmd : []string {"mongo" ,
430
- "mongodb://localhost:12345/docdb?serverSelectionTimeoutMS=5000" ,
430
+ "mongodb://localhost:12345/docdb?directConnection=true& serverSelectionTimeoutMS=5000" ,
431
431
},
432
432
wantErr : false ,
433
433
},
@@ -442,7 +442,7 @@ func TestCLICommandBuilderGetConnectCommand(t *testing.T) {
442
442
},
443
443
},
444
444
cmd : []string {"mongosh" ,
445
- "mongodb://localhost:12345/docdb?serverSelectionTimeoutMS=5000" ,
445
+ "mongodb://localhost:12345/docdb?directConnection=true& serverSelectionTimeoutMS=5000" ,
446
446
"--retryWrites=false" ,
447
447
},
448
448
wantErr : false ,
0 commit comments