Skip to content

Commit c357acf

Browse files
authored
test(NODE-4975): missing mongodb test imports (#3522)
1 parent 1f1a72b commit c357acf

File tree

92 files changed

+168
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+168
-132
lines changed

.eslintrc.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,18 @@
192192
"rules": {
193193
"no-console": "off",
194194
"no-restricted-syntax": "off",
195-
"typescript-eslint/ban-ts-comment": "off"
195+
"typescript-eslint/ban-ts-comment": "off",
196+
"no-restricted-imports": "off",
197+
"@typescript-eslint/no-restricted-imports": [
198+
"error",
199+
{
200+
"patterns": [
201+
"**/../lib/**",
202+
"**/../src/**",
203+
"mongodb-mock-server"
204+
]
205+
}
206+
]
196207
}
197208
},
198209
{
@@ -227,7 +238,6 @@
227238
{
228239
"patterns": [
229240
"**/../lib/**",
230-
"**/../src/**",
231241
"mongodb-mock-server"
232242
]
233243
}

test/integration/auth/mongodb_aws.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as http from 'http';
33
import { performance } from 'perf_hooks';
44
import * as sinon from 'sinon';
55

6-
import { MongoAWSError, MongoClient, MongoServerError } from '../../../src';
6+
import { MongoAWSError, MongoClient, MongoServerError } from '../../mongodb';
77
import { removeAuthFromConnectionString } from '../../tools/utils';
88

99
describe('MONGODB-AWS', function () {

test/integration/auth/scram_sha_1.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai';
22

3-
import type { MongoClient } from '../../../src';
3+
import type { MongoClient } from '../../mongodb';
44

55
describe('SCRAM-SHA-1', function () {
66
let client: MongoClient;

test/integration/auth/ssl_x509_connect.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs');
33
const { format: f } = require('util');
44
const { test, setupDatabase } = require('../shared');
55
const { expect } = require('chai');
6-
const { MongoClient } = require('../../../src');
6+
const { MongoClient } = require('../../mongodb');
77

88
describe('SSL (x509)', function () {
99
before(function () {

test/integration/bson-decimal128/decimal128.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const { assert: test } = require('../shared');
33
const { expect } = require('chai');
44
const { setupDatabase } = require('../shared');
5-
const { Decimal128 } = require('../../../src');
5+
const { Decimal128 } = require('../../mongodb');
66

77
describe('Decimal128', function () {
88
before(function () {

test/integration/change-streams/change_stream.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import {
1414
Collection,
1515
CommandStartedEvent,
1616
Db,
17+
isHello,
1718
Long,
1819
MongoAPIError,
1920
MongoChangeStreamError,
2021
MongoClient,
2122
MongoServerError,
2223
ReadPreference,
2324
ResumeToken
24-
} from '../../../src';
25-
import { isHello } from '../../mongodb';
25+
} from '../../mongodb';
2626
import * as mock from '../../tools/mongodb-mock/index';
2727
import {
2828
FailPoint,

test/integration/change-streams/change_streams.prose.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ import {
88
CommandStartedEvent,
99
CommandSucceededEvent,
1010
Document,
11+
isHello,
12+
LEGACY_HELLO_COMMAND,
1113
Long,
1214
MongoNetworkError,
1315
ObjectId,
1416
Timestamp
15-
} from '../../../src';
16-
import { isHello, LEGACY_HELLO_COMMAND } from '../../mongodb';
17+
} from '../../mongodb';
1718
import * as mock from '../../tools/mongodb-mock/index';
1819
import { setupDatabase } from '../shared';
1920

test/integration/client-side-encryption/driver.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { EJSON, UUID } from 'bson';
22
import { expect } from 'chai';
33
import * as crypto from 'crypto';
44

5-
import { Collection, CommandStartedEvent, MongoClient } from '../../../src';
5+
import { Collection, CommandStartedEvent, MongoClient } from '../../mongodb';
66
import * as BSON from '../../mongodb';
77
import { installNodeDNSWorkaroundHooks } from '../../tools/runner/hooks/configuration';
88
import { ClientEncryption } from '../../tools/unified-spec-runner/schema';

test/integration/collection-management/collection.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { expect } from 'chai';
22

3-
import { Collection, Db, MongoClient } from '../../../src';
4-
import { isHello } from '../../mongodb';
3+
import { Collection, Db, isHello, MongoClient } from '../../mongodb';
54
import * as mock from '../../tools/mongodb-mock/index';
65
import { setupDatabase } from '../shared';
76

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { expect } from 'chai';
22

3-
import { MongoClient, MongoServerError, ServerHeartbeatStartedEvent } from '../../../src';
43
import {
54
connect,
65
Connection,
76
HostAddress,
87
LEGACY_HELLO_COMMAND,
8+
MongoClient,
9+
MongoServerError,
910
ns,
11+
ServerHeartbeatStartedEvent,
1012
Topology
1113
} from '../../mongodb';
1214
import { skipBrokenAuthTestBeforeEachHook } from '../../tools/runner/hooks/configuration';

0 commit comments

Comments
 (0)