Skip to content

Commit 9b941b6

Browse files
committed
wip
1 parent 85f8cef commit 9b941b6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/integration/auth/mongodb_aws.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ describe('MONGODB-AWS', function () {
8888
options: CommandOptions,
8989
responseType?: MongoDBResponseConstructor
9090
) {
91-
if (command.saslStart != null || command.saslContinue != null) {
92-
console.log(command);
93-
}
94-
9591
const result = await commandStub.wrappedMethod.call(
9692
this,
9793
ns,
@@ -100,12 +96,14 @@ describe('MONGODB-AWS', function () {
10096
responseType
10197
);
10298

103-
if (command.saslStart != null) {
104-
// Modify the result to check if the saslContinue uses it
99+
if (command.saslStart != null && command.mechanism === 'MONGODB-AWS') {
100+
// Modify the result of the saslStart to check if the saslContinue uses it
105101
result.conversationId = 999;
106102
saslStartResult = { ...result };
107103
}
104+
108105
if (command.saslContinue != null) {
106+
console.log('saving saslContinue');
109107
saslContinue = { ...command };
110108
}
111109

@@ -125,6 +123,7 @@ describe('MONGODB-AWS', function () {
125123
.collection('aws_test')
126124
.estimatedDocumentCount()
127125
.catch(e => e);
126+
console.log(err);
128127

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

0 commit comments

Comments
 (0)