Skip to content

Commit 81ce532

Browse files
committed
cleanup test
1 parent 82da1e8 commit 81ce532

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

test/unit/srv_option_handling.test.ts

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,22 @@ describe('Srv Option Handling', () => {
100100
expect(options).to.have.nested.property('credentials.source', 'thisShouldBeAuthSource');
101101
});
102102

103-
for (const iterator of [
104-
{ mechanism: AuthMechanism.MONGODB_AWS },
105-
{ mechmanism: AuthMechanism.MONGODB_SCRAM_SHA256 }
106-
]) {
107-
it('should retain credentials for any mechanism with no user-sepcificed source and no source in DNS:', async function () {
108-
makeStub('');
109-
const options = {
110-
credentials: new MongoCredentials({
111-
source: 'admin',
112-
mechanism: iterator.mechanism,
113-
username: 'username',
114-
password: 'password',
115-
mechanismProperties: {}
116-
}),
117-
srvHost: 'test.mock.test.build.10gen.cc',
118-
srvServiceName: 'mongodb',
119-
userSpecifiedAuthSource: false
120-
};
103+
it('should retain credentials for any mechanism with no user-sepcificed source and no source in DNS:', async function () {
104+
makeStub('');
105+
const options = {
106+
credentials: new MongoCredentials({
107+
source: 'admin',
108+
mechanism: AuthMechanism.MONGODB_SCRAM_SHA256,
109+
username: 'username',
110+
password: 'password',
111+
mechanismProperties: {}
112+
}),
113+
srvHost: 'test.mock.test.build.10gen.cc',
114+
srvServiceName: 'mongodb',
115+
userSpecifiedAuthSource: false
116+
};
121117

122-
await resolveSRVRecordAsync(options as any);
123-
expect(options).to.have.nested.property('credentials.source', 'admin');
124-
});
125-
}
118+
await resolveSRVRecordAsync(options as any);
119+
expect(options).to.have.nested.property('credentials.source', 'admin');
120+
});
126121
});

0 commit comments

Comments
 (0)