From 979e021dc2efad95288e4acfee16c21723313d0c Mon Sep 17 00:00:00 2001 From: Warren James Date: Thu, 23 Jan 2025 17:01:55 -0500 Subject: [PATCH] fix test --- test/integration/auth/mongodb_aws.test.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/integration/auth/mongodb_aws.test.ts b/test/integration/auth/mongodb_aws.test.ts index d495cf4824..d022e0235f 100644 --- a/test/integration/auth/mongodb_aws.test.ts +++ b/test/integration/auth/mongodb_aws.test.ts @@ -88,6 +88,10 @@ describe('MONGODB-AWS', function () { options: CommandOptions, responseType?: MongoDBResponseConstructor ) { + if (command.saslContinue != null) { + saslContinue = { ...command }; + } + const result = await commandStub.wrappedMethod.call( this, ns, @@ -96,22 +100,18 @@ describe('MONGODB-AWS', function () { responseType ); - if (command.saslStart != null && command.mechanism === 'MONGODB-AWS') { + if (command.saslStart != null) { // Modify the result of the saslStart to check if the saslContinue uses it result.conversationId = 999; saslStartResult = { ...result }; } - if (command.saslContinue != null) { - console.log('saving saslContinue'); - saslContinue = { ...command }; - } - return result; }); }); afterEach(function () { + commandStub.restore(); sinon.restore(); }); @@ -123,7 +123,6 @@ describe('MONGODB-AWS', function () { .collection('aws_test') .estimatedDocumentCount() .catch(e => e); - console.log(err); // Expecting the saslContinue to fail since we changed the conversationId expect(err).to.be.instanceof(MongoServerError);