Skip to content

Commit afe4c9e

Browse files
committed
reverting unnecessary changes outside of unit tests
1 parent 4f9184c commit afe4c9e

File tree

11 files changed

+48
-40
lines changed

11 files changed

+48
-40
lines changed

test/action/dependency.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as path from 'node:path';
55
import { expect } from 'chai';
66

77
import { dependencies, peerDependencies, peerDependenciesMeta } from '../../package.json';
8-
import { setDifference } from '../../src/utils';
8+
import { setDifference } from '../mongodb';
99
import { alphabetically, itInNodeProcess, sorted } from '../tools/utils';
1010

1111
const EXPECTED_DEPENDENCIES = sorted(

test/integration/auth/auth.prose.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { expect } from 'chai';
22
import * as sinon from 'sinon';
33

4-
import { ScramSHA256 } from '../../../src/cmap/auth/scram';
5-
import { Connection } from '../../../src/cmap/connection';
6-
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
7-
import { type MongoClient } from '../../../src/mongo_client';
4+
import { Connection, LEGACY_HELLO_COMMAND, type MongoClient, ScramSHA256 } from '../../mongodb';
85
import { type TestConfiguration } from '../../tools/runner/config';
96

107
function makeConnectionString(config, username, password) {

test/integration/auth/mongodb_aws.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import * as process from 'node:process';
22

3-
import { type Document } from 'bson';
43
import { expect } from 'chai';
54
import * as http from 'http';
65
import { performance } from 'perf_hooks';
76
import * as sinon from 'sinon';
87

98
import { refreshKMSCredentials } from '../../../src/client-side-encryption/providers';
10-
import { AWSSDKCredentialProvider } from '../../../src/cmap/auth/aws_temporary_credentials';
11-
import { MongoDBAWS } from '../../../src/cmap/auth/mongodb_aws';
12-
import { type CommandOptions, Connection } from '../../../src/cmap/connection';
13-
import { type MongoDBResponseConstructor } from '../../../src/cmap/wire_protocol/responses';
149
import {
10+
AWSSDKCredentialProvider,
11+
type CommandOptions,
12+
Connection,
13+
type Document,
1514
MongoAWSError,
15+
type MongoClient,
16+
MongoDBAWS,
17+
type MongoDBNamespace,
18+
type MongoDBResponseConstructor,
1619
MongoMissingCredentialsError,
1720
MongoMissingDependencyError,
18-
MongoServerError
19-
} from '../../../src/error';
20-
import { type MongoClient } from '../../../src/mongo_client';
21-
import { type MongoDBNamespace, setDifference } from '../../../src/utils';
21+
MongoServerError,
22+
setDifference
23+
} from '../../mongodb';
2224

2325
const isMongoDBAWSAuthEnvironment = (process.env.MONGODB_URI ?? '').includes('MONGODB-AWS');
2426

test/integration/client-side-encryption/client_side_encryption.prose.21.automatic_data_encryption_keys.test.ts

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

33
import { ClientEncryption } from '../../../src/client-side-encryption/client_encryption';
44
import { MongoCryptCreateEncryptedCollectionError } from '../../../src/client-side-encryption/errors';
5-
import { Collection } from '../../../src/collection';
6-
import { type Db } from '../../../src/db';
7-
import { MongoServerError } from '../../../src/error';
85
import {
96
getCSFLEKMSProviders,
107
kmsCredentialsPresent,
118
missingKeys
129
} from '../../csfle-kms-providers';
10+
import { Collection, type Db, MongoServerError } from '../../mongodb';
1311

1412
const metadata: MongoDBMetadataUI = {
1513
requires: {

test/integration/enumerate_databases.prose.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/mongo_client';
3+
import type { MongoClient } from '../mongodb';
44

55
const REQUIRED_DBS = ['admin', 'local', 'config'];
66
const DB_NAME = 'listDatabasesTest';

test/integration/enumerate_databases.test.ts

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

4-
import { MongoServerError } from '../../src/error';
5-
import { type MongoClient } from '../../src/mongo_client';
4+
import { type MongoClient, MongoServerError } from '../mongodb';
65
import { TestBuilder, UnifiedTestSuiteBuilder } from '../tools/unified_suite_builder';
76

87
const metadata: MongoDBMetadataUI = {

test/integration/index_management.test.ts

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

33
import {
4+
type Collection,
45
type CommandStartedEvent,
5-
type CommandSucceededEvent
6-
} from '../../src/cmap/command_monitoring_events';
7-
import { type Collection } from '../../src/collection';
8-
import { type Db } from '../../src/db';
9-
import { MongoServerError } from '../../src/error';
10-
import { type MongoClient } from '../../src/mongo_client';
6+
type CommandSucceededEvent,
7+
type Db,
8+
type MongoClient,
9+
MongoServerError
10+
} from '../mongodb';
1111
import { type FailCommandFailPoint } from '../tools/utils';
1212
import { assert as test, filterForCommands, setupDatabase } from './shared';
1313

test/tools/mongodb-mock/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require('fs');
22
const { MockServer } = require('./src/server.js');
3-
const { LEGACY_HELLO_COMMAND } = require('../../../src/constants.ts');
3+
const { LEGACY_HELLO_COMMAND } = require('../../mongodb');
44

55
let mockServers = [];
66

test/tools/runner/config.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
import * as util from 'node:util';
22
import * as types from 'node:util/types';
33

4-
import { Double, Long, ObjectId } from 'bson';
54
import { expect } from 'chai';
65
import { type Context } from 'mocha';
76
import ConnectionString from 'mongodb-connection-string-url';
87
import { type CompressorName } from 'mongodb-legacy';
98
import * as qs from 'querystring';
109
import * as url from 'url';
1110

12-
import { type AuthMechanism } from '../../../src/cmap/auth/providers';
13-
import { MongoClient, type MongoClientOptions, type ServerApi } from '../../../src/mongo_client';
14-
import { TopologyType } from '../../../src/sdam/common';
15-
import { HostAddress } from '../../../src/utils';
16-
import { type WriteConcernSettings } from '../../../src/write_concern';
11+
import {
12+
type AuthMechanism,
13+
Double,
14+
HostAddress,
15+
Long,
16+
MongoClient,
17+
type MongoClientOptions,
18+
ObjectId,
19+
type ServerApi,
20+
TopologyType,
21+
type WriteConcernSettings
22+
} from '../../mongodb';
1723
import { getEnvironmentalOptions } from '../utils';
1824
import { type Filter } from './filters/filter';
1925
import { flakyTests } from './flaky';

test/tools/runner/filters/filter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type MongoClient } from '../../../../src/mongo_client';
1+
import { type MongoClient } from '../../../mongodb';
22

33
export abstract class Filter {
44
async initializeFilter(_client: MongoClient, _context: Record<string, any>): Promise<void> {

0 commit comments

Comments
 (0)