@@ -214,8 +214,13 @@ describe('e2e TLS', () => {
214
214
} ) ;
215
215
const prompt = await shell . waitForPromptOrExit ( ) ;
216
216
expect ( prompt . state ) . to . equal ( 'prompt' ) ;
217
- await shell . executeLine ( 'db.runCommand({ connectionStatus: 1 })' ) ;
218
- shell . assertContainsOutput ( `user: '${ certUser } '` ) ;
217
+ expect ( await shell . executeLine ( 'db.runCommand({ connectionStatus: 1 })' ) )
218
+ . to . include ( `user: '${ certUser } '` ) ;
219
+
220
+ expect ( await shell . executeLine ( 'db.getSiblingDB("$external").auth({mechanism: "MONGODB-X509"})' ) )
221
+ . to . include ( 'ok: 1' ) ;
222
+ expect ( await shell . executeLine ( 'db.runCommand({ connectionStatus: 1 })' ) )
223
+ . to . include ( `user: '${ certUser } '` ) ;
219
224
} ) ;
220
225
221
226
it ( 'works with valid cert (connection string)' , async ( ) => {
@@ -228,8 +233,13 @@ describe('e2e TLS', () => {
228
233
} ) ;
229
234
const prompt = await shell . waitForPromptOrExit ( ) ;
230
235
expect ( prompt . state ) . to . equal ( 'prompt' ) ;
231
- await shell . executeLine ( 'db.runCommand({ connectionStatus: 1 })' ) ;
232
- shell . assertContainsOutput ( `user: '${ certUser } '` ) ;
236
+ expect ( await shell . executeLine ( 'db.runCommand({ connectionStatus: 1 })' ) )
237
+ . to . include ( `user: '${ certUser } '` ) ;
238
+
239
+ expect ( await shell . executeLine ( 'db.getSiblingDB("$external").auth({mechanism: "MONGODB-X509"})' ) )
240
+ . to . include ( 'ok: 1' ) ;
241
+ expect ( await shell . executeLine ( 'db.runCommand({ connectionStatus: 1 })' ) )
242
+ . to . include ( `user: '${ certUser } '` ) ;
233
243
} ) ;
234
244
235
245
it ( 'fails with invalid cert (args)' , async ( ) => {
0 commit comments