Skip to content

Commit 979e021

Browse files
committed
fix test
1 parent 9b941b6 commit 979e021

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/integration/auth/mongodb_aws.test.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ describe('MONGODB-AWS', function () {
8888
options: CommandOptions,
8989
responseType?: MongoDBResponseConstructor
9090
) {
91+
if (command.saslContinue != null) {
92+
saslContinue = { ...command };
93+
}
94+
9195
const result = await commandStub.wrappedMethod.call(
9296
this,
9397
ns,
@@ -96,22 +100,18 @@ describe('MONGODB-AWS', function () {
96100
responseType
97101
);
98102

99-
if (command.saslStart != null && command.mechanism === 'MONGODB-AWS') {
103+
if (command.saslStart != null) {
100104
// Modify the result of the saslStart to check if the saslContinue uses it
101105
result.conversationId = 999;
102106
saslStartResult = { ...result };
103107
}
104108

105-
if (command.saslContinue != null) {
106-
console.log('saving saslContinue');
107-
saslContinue = { ...command };
108-
}
109-
110109
return result;
111110
});
112111
});
113112

114113
afterEach(function () {
114+
commandStub.restore();
115115
sinon.restore();
116116
});
117117

@@ -123,7 +123,6 @@ describe('MONGODB-AWS', function () {
123123
.collection('aws_test')
124124
.estimatedDocumentCount()
125125
.catch(e => e);
126-
console.log(err);
127126

128127
// Expecting the saslContinue to fail since we changed the conversationId
129128
expect(err).to.be.instanceof(MongoServerError);

0 commit comments

Comments
 (0)