Skip to content

Commit 9aa605e

Browse files
committed
test: pool options still have credentials set
1 parent 9d7a19d commit 9aa605e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/integration/connection-monitoring-and-pooling/connection_monitoring_and_pooling.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ describe('Connection Monitoring and Pooling (Node Driver)', function () {
4646
await client.connect();
4747
const [event] = await poolCreated;
4848
expect(event).to.have.deep.nested.property('options.credentials', {});
49+
50+
const poolOptions = Array.from(client.topology?.s.servers.values() ?? []).map(
51+
s => s.pool.options
52+
);
53+
expect(poolOptions).to.have.length.of.at.least(1);
54+
55+
for (const { credentials = {} } of poolOptions) {
56+
expect(
57+
Object.keys(credentials),
58+
'pool.options.credentials must exist and have keys'
59+
).to.not.equal(0);
60+
}
4961
}
5062
});
5163

0 commit comments

Comments
 (0)