@@ -2,7 +2,7 @@ import { expect } from 'chai';
2
2
import type { Db , Document , MongoClientOptions } from 'mongodb' ;
3
3
import { MongoClient } from 'mongodb' ;
4
4
import { eventually } from '../../../testing/eventually' ;
5
- import { cleanTestShellsAfterEach , TestShell } from './test-shell' ;
5
+ import type { TestShell } from './test-shell' ;
6
6
import {
7
7
skipIfApiStrict ,
8
8
startSharedTestServer ,
@@ -107,12 +107,10 @@ describe('Auth e2e', function () {
107
107
let examplePrivilege2 : Document ;
108
108
109
109
describe ( 'with regular URI' , function ( ) {
110
- cleanTestShellsAfterEach ( ) ;
111
-
112
110
beforeEach ( async function ( ) {
113
111
const connectionString = await testServer . connectionString ( ) ;
114
112
dbName = `test-${ Date . now ( ) } ` ;
115
- shell = TestShell . start ( { args : [ connectionString ] } ) ;
113
+ shell = this . startTestShell ( { args : [ connectionString ] } ) ;
116
114
117
115
client = await MongoClient . connect ( connectionString , { } ) ;
118
116
@@ -880,7 +878,7 @@ describe('Auth e2e', function () {
880
878
pathname : `/${ dbName } ` ,
881
879
}
882
880
) ;
883
- shell = TestShell . start ( { args : [ authConnectionString ] } ) ;
881
+ shell = this . startTestShell ( { args : [ authConnectionString ] } ) ;
884
882
await shell . waitForPrompt ( ) ;
885
883
shell . assertNoErrors ( ) ;
886
884
await shell . executeLine ( `use ${ dbName } ` ) ;
@@ -904,7 +902,7 @@ describe('Auth e2e', function () {
904
902
pathname : `/${ dbName } ` ,
905
903
}
906
904
) ;
907
- shell = TestShell . start ( { args : [ authConnectionString ] } ) ;
905
+ shell = this . startTestShell ( { args : [ authConnectionString ] } ) ;
908
906
await shell . waitForPrompt ( ) ;
909
907
shell . assertNoErrors ( ) ;
910
908
await shell . executeLine ( `use ${ dbName } ` ) ;
@@ -931,7 +929,7 @@ describe('Auth e2e', function () {
931
929
} ) ;
932
930
it ( 'can auth when there is -u and -p' , async function ( ) {
933
931
const connectionString = await testServer . connectionString ( ) ;
934
- shell = TestShell . start ( {
932
+ shell = this . startTestShell ( {
935
933
args : [
936
934
connectionString ,
937
935
'-u' ,
@@ -966,7 +964,7 @@ describe('Auth e2e', function () {
966
964
return this . skip ( ) ; // No SCRAM-SHA-1 in FIPS mode
967
965
}
968
966
const connectionString = await testServer . connectionString ( ) ;
969
- shell = TestShell . start ( {
967
+ shell = this . startTestShell ( {
970
968
args : [
971
969
connectionString ,
972
970
'-u' ,
@@ -990,7 +988,7 @@ describe('Auth e2e', function () {
990
988
// This test is not particularly meaningful if we're using the system OpenSSL installation
991
989
// and it is not properly configured for FIPS to begin with. This is the case on e.g.
992
990
// Ubuntu 22.04 in evergreen CI.
993
- const preTestShell = TestShell . start ( {
991
+ const preTestShell = this . startTestShell ( {
994
992
args : [
995
993
'--quiet' ,
996
994
'--nodb' ,
@@ -1010,7 +1008,7 @@ describe('Auth e2e', function () {
1010
1008
}
1011
1009
1012
1010
const connectionString = await testServer . connectionString ( ) ;
1013
- shell = TestShell . start ( {
1011
+ shell = this . startTestShell ( {
1014
1012
args : [
1015
1013
connectionString ,
1016
1014
'--tlsFIPSMode' ,
@@ -1035,7 +1033,7 @@ describe('Auth e2e', function () {
1035
1033
} ) ;
1036
1034
it ( 'can auth with SCRAM-SHA-256' , async function ( ) {
1037
1035
const connectionString = await testServer . connectionString ( ) ;
1038
- shell = TestShell . start ( {
1036
+ shell = this . startTestShell ( {
1039
1037
args : [
1040
1038
connectionString ,
1041
1039
'-u' ,
@@ -1056,7 +1054,7 @@ describe('Auth e2e', function () {
1056
1054
} ) ;
1057
1055
it ( 'cannot auth when authenticationMechanism mismatches (sha256 -> sha1)' , async function ( ) {
1058
1056
const connectionString = await testServer . connectionString ( ) ;
1059
- shell = TestShell . start ( {
1057
+ shell = this . startTestShell ( {
1060
1058
args : [
1061
1059
connectionString ,
1062
1060
'-u' ,
@@ -1077,7 +1075,7 @@ describe('Auth e2e', function () {
1077
1075
} ) ;
1078
1076
it ( 'cannot auth when authenticationMechanism mismatches (sha1 -> sha256)' , async function ( ) {
1079
1077
const connectionString = await testServer . connectionString ( ) ;
1080
- shell = TestShell . start ( {
1078
+ shell = this . startTestShell ( {
1081
1079
args : [
1082
1080
connectionString ,
1083
1081
'-u' ,
@@ -1098,7 +1096,7 @@ describe('Auth e2e', function () {
1098
1096
} ) ;
1099
1097
it ( 'does not fail with kerberos not found for GSSAPI' , async function ( ) {
1100
1098
const connectionString = await testServer . connectionString ( ) ;
1101
- shell = TestShell . start ( {
1099
+ shell = this . startTestShell ( {
1102
1100
args : [
1103
1101
connectionString ,
1104
1102
'-u' ,
@@ -1145,7 +1143,5 @@ describe('Auth e2e', function () {
1145
1143
1146
1144
await client . close ( ) ;
1147
1145
} ) ;
1148
-
1149
- cleanTestShellsAfterEach ( ) ;
1150
1146
} ) ;
1151
1147
} ) ;
0 commit comments