77 skipIfApiStrict ,
88 startSharedTestServer ,
99} from '@mongosh/testing' ;
10+ import { startTestShell } from './test-shell-context' ;
1011
1112type AssertUserExists = ( opts ?: Document , username ?: string ) => Promise < void > ;
1213function createAssertUserExists ( db : Db , dbName : string ) : AssertUserExists {
@@ -110,7 +111,7 @@ describe('Auth e2e', function () {
110111 beforeEach ( async function ( ) {
111112 const connectionString = await testServer . connectionString ( ) ;
112113 dbName = `test-${ Date . now ( ) } ` ;
113- shell = this . startTestShell ( { args : [ connectionString ] } ) ;
114+ shell = startTestShell ( this , { args : [ connectionString ] } ) ;
114115
115116 client = await MongoClient . connect ( connectionString , { } ) ;
116117
@@ -878,7 +879,7 @@ describe('Auth e2e', function () {
878879 pathname : `/${ dbName } ` ,
879880 }
880881 ) ;
881- shell = this . startTestShell ( { args : [ authConnectionString ] } ) ;
882+ shell = startTestShell ( this , { args : [ authConnectionString ] } ) ;
882883 await shell . waitForPrompt ( ) ;
883884 shell . assertNoErrors ( ) ;
884885 await shell . executeLine ( `use ${ dbName } ` ) ;
@@ -902,7 +903,7 @@ describe('Auth e2e', function () {
902903 pathname : `/${ dbName } ` ,
903904 }
904905 ) ;
905- shell = this . startTestShell ( { args : [ authConnectionString ] } ) ;
906+ shell = startTestShell ( this , { args : [ authConnectionString ] } ) ;
906907 await shell . waitForPrompt ( ) ;
907908 shell . assertNoErrors ( ) ;
908909 await shell . executeLine ( `use ${ dbName } ` ) ;
@@ -929,7 +930,7 @@ describe('Auth e2e', function () {
929930 } ) ;
930931 it ( 'can auth when there is -u and -p' , async function ( ) {
931932 const connectionString = await testServer . connectionString ( ) ;
932- shell = this . startTestShell ( {
933+ shell = startTestShell ( this , {
933934 args : [
934935 connectionString ,
935936 '-u' ,
@@ -964,7 +965,7 @@ describe('Auth e2e', function () {
964965 return this . skip ( ) ; // No SCRAM-SHA-1 in FIPS mode
965966 }
966967 const connectionString = await testServer . connectionString ( ) ;
967- shell = this . startTestShell ( {
968+ shell = startTestShell ( this , {
968969 args : [
969970 connectionString ,
970971 '-u' ,
@@ -988,7 +989,7 @@ describe('Auth e2e', function () {
988989 // This test is not particularly meaningful if we're using the system OpenSSL installation
989990 // and it is not properly configured for FIPS to begin with. This is the case on e.g.
990991 // Ubuntu 22.04 in evergreen CI.
991- const preTestShell = this . startTestShell ( {
992+ const preTestShell = startTestShell ( this , {
992993 args : [
993994 '--quiet' ,
994995 '--nodb' ,
@@ -1008,7 +1009,7 @@ describe('Auth e2e', function () {
10081009 }
10091010
10101011 const connectionString = await testServer . connectionString ( ) ;
1011- shell = this . startTestShell ( {
1012+ shell = startTestShell ( this , {
10121013 args : [
10131014 connectionString ,
10141015 '--tlsFIPSMode' ,
@@ -1033,7 +1034,7 @@ describe('Auth e2e', function () {
10331034 } ) ;
10341035 it ( 'can auth with SCRAM-SHA-256' , async function ( ) {
10351036 const connectionString = await testServer . connectionString ( ) ;
1036- shell = this . startTestShell ( {
1037+ shell = startTestShell ( this , {
10371038 args : [
10381039 connectionString ,
10391040 '-u' ,
@@ -1054,7 +1055,7 @@ describe('Auth e2e', function () {
10541055 } ) ;
10551056 it ( 'cannot auth when authenticationMechanism mismatches (sha256 -> sha1)' , async function ( ) {
10561057 const connectionString = await testServer . connectionString ( ) ;
1057- shell = this . startTestShell ( {
1058+ shell = startTestShell ( this , {
10581059 args : [
10591060 connectionString ,
10601061 '-u' ,
@@ -1075,7 +1076,7 @@ describe('Auth e2e', function () {
10751076 } ) ;
10761077 it ( 'cannot auth when authenticationMechanism mismatches (sha1 -> sha256)' , async function ( ) {
10771078 const connectionString = await testServer . connectionString ( ) ;
1078- shell = this . startTestShell ( {
1079+ shell = startTestShell ( this , {
10791080 args : [
10801081 connectionString ,
10811082 '-u' ,
@@ -1096,7 +1097,7 @@ describe('Auth e2e', function () {
10961097 } ) ;
10971098 it ( 'does not fail with kerberos not found for GSSAPI' , async function ( ) {
10981099 const connectionString = await testServer . connectionString ( ) ;
1099- shell = this . startTestShell ( {
1100+ shell = startTestShell ( this , {
11001101 args : [
11011102 connectionString ,
11021103 '-u' ,
0 commit comments