Skip to content

Commit bfcacb7

Browse files
authored
feat(devtools-connect): enable driver network check during connect COMPASS-9455 (#628)
1 parent cd56f7e commit bfcacb7

2 files changed

Lines changed: 5 additions & 32 deletions

File tree

packages/devtools-connect/src/connect.spec.ts

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ describe('devtools connect', function () {
5555
expect(mClientType.getCalls()[0].args[0]).to.equal(uri);
5656
expect(
5757
Object.keys(mClientType.getCalls()[0].args[1]).sort(),
58-
).to.deep.equal([
59-
'__skipPingOnConnect',
60-
'allowPartialTrustChain',
61-
'ca',
62-
'lookup',
63-
]);
58+
).to.deep.equal(['allowPartialTrustChain', 'ca', 'lookup']);
6459
expect(mClient.connect.getCalls()).to.have.lengthOf(1);
6560
expect(result.client).to.equal(mClient);
6661
});
@@ -83,7 +78,6 @@ describe('devtools connect', function () {
8378
expect(
8479
Object.keys(mClientType.getCalls()[0].args[1]).sort(),
8580
).to.deep.equal([
86-
'__skipPingOnConnect',
8781
'allowPartialTrustChain',
8882
'autoEncryption',
8983
'ca',
@@ -129,12 +123,7 @@ describe('devtools connect', function () {
129123
expect(calls[0].args[0]).to.equal(uri);
130124
expect(
131125
Object.keys(mClientType.getCalls()[0].args[1]).sort(),
132-
).to.deep.equal([
133-
'__skipPingOnConnect',
134-
'allowPartialTrustChain',
135-
'ca',
136-
'lookup',
137-
]);
126+
).to.deep.equal(['allowPartialTrustChain', 'ca', 'lookup']);
138127
expect(commandSpy).to.have.been.calledOnceWithExactly({ buildInfo: 1 });
139128
expect(result.client).to.equal(mClientSecond);
140129
});
@@ -213,7 +202,6 @@ describe('devtools connect', function () {
213202
expect(
214203
Object.keys(mClientType.getCalls()[0].args[1]).sort(),
215204
).to.deep.equal([
216-
'__skipPingOnConnect',
217205
'allowPartialTrustChain',
218206
'autoEncryption',
219207
'ca',
@@ -256,12 +244,7 @@ describe('devtools connect', function () {
256244
expect(mClientType.getCalls()[0].args[0]).to.equal(uri);
257245
expect(
258246
Object.keys(mClientType.getCalls()[0].args[1]).sort(),
259-
).to.deep.equal([
260-
'__skipPingOnConnect',
261-
'allowPartialTrustChain',
262-
'ca',
263-
'lookup',
264-
]);
247+
).to.deep.equal(['allowPartialTrustChain', 'ca', 'lookup']);
265248
expect(commandSpy).to.have.been.calledOnceWithExactly({ buildInfo: 1 });
266249
expect(result.client).to.equal(mClientSecond);
267250
});
@@ -477,19 +460,10 @@ describe('devtools connect', function () {
477460
expect(mClientType.getCalls()).to.have.lengthOf(2);
478461
expect(
479462
Object.keys(mClientType.getCalls()[0].args[1]).sort(),
480-
).to.deep.equal([
481-
'__skipPingOnConnect',
482-
'allowPartialTrustChain',
483-
'ca',
484-
'lookup',
485-
]);
463+
).to.deep.equal(['allowPartialTrustChain', 'ca', 'lookup']);
486464
expect(
487465
Object.keys(mClientType.getCalls()[1].args[1]).sort(),
488-
).to.deep.equal([
489-
'__skipPingOnConnect',
490-
'allowPartialTrustChain',
491-
'lookup',
492-
]);
466+
).to.deep.equal(['allowPartialTrustChain', 'lookup']);
493467
expect((mClient as any).connect.getCalls()).to.have.lengthOf(2);
494468

495469
expect(earlyFailures).to.equal(2);

packages/devtools-connect/src/connect.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,6 @@ async function connectMongoClientImpl({
590590
new DevtoolsConnectionState(clientOptions, logger);
591591
const mongoClientOptions: MongoClientOptions &
592592
Partial<DevtoolsConnectOptions> = merge(
593-
{ __skipPingOnConnect: true },
594593
clientOptions,
595594
shouldAddOidcCallbacks ? state.oidcPlugin.mongoClientOptions : {},
596595
{ allowPartialTrustChain: true },

0 commit comments

Comments
 (0)