Skip to content

Commit 19dc794

Browse files
consolidate imports & minor unit test fixes
1 parent e334994 commit 19dc794

97 files changed

Lines changed: 383 additions & 323 deletions

File tree

Some content is hidden

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

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

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

5-
import { type MongoClient } from '../../mongodb';
6-
import { Connection, LEGACY_HELLO_COMMAND, ScramSHA256 } from '../../mongodb';
5+
import { Connection, LEGACY_HELLO_COMMAND, type MongoClient, ScramSHA256 } from '../../mongodb';
76
import { type TestConfiguration } from '../../tools/runner/config';
87

98
function makeConnectionString(config, username, password) {

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

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

4-
import { type MongoClient, MongoServerError } from '../../mongodb';
5-
import { AWSSDKCredentialProvider } from '../../mongodb';
6-
4+
import { AWSSDKCredentialProvider, type MongoClient, MongoServerError } from '../../mongodb';
75
const isMongoDBAWSAuthEnvironment = (process.env.MONGODB_URI ?? '').includes('MONGODB-AWS');
86

97
describe('MONGODB-AWS Prose Tests', function () {

test/integration/auth/mongodb_aws.test.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,23 @@ import * as process from 'process';
55
import * as sinon from 'sinon';
66

77
import {
8+
aws4Sign,
89
type AWSCredentials,
10+
AWSSDKCredentialProvider,
911
type CommandOptions,
12+
Connection,
1013
type Document,
1114
MongoAWSError,
1215
type MongoClient,
16+
MongoDBAWS,
1317
type MongoDBNamespace,
1418
type MongoDBResponseConstructor,
1519
MongoMissingCredentialsError,
1620
MongoMissingDependencyError,
17-
MongoServerError
18-
} from '../../mongodb';
19-
import {
20-
aws4Sign,
21-
AWSSDKCredentialProvider,
22-
Connection,
23-
MongoDBAWS,
21+
MongoServerError,
2422
refreshKMSCredentials,
2523
setDifference
2624
} from '../../mongodb';
27-
2825
const isMongoDBAWSAuthEnvironment = (process.env.MONGODB_URI ?? '').includes('MONGODB-AWS');
2926

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import {
1010
type Collection,
1111
MongoClient,
1212
type MongoClientOptions,
13+
type MongoDBOIDC,
14+
type OIDCCallbackFunction,
1315
type OIDCCallbackParams,
1416
type OIDCResponse
1517
} from '../../mongodb';
16-
import { type MongoDBOIDC, type OIDCCallbackFunction } from '../../mongodb';
17-
1818
const createCallback = (tokenFile = 'test_user1', expiresInSeconds?: number, extraFields?: any) => {
1919
return async (params: OIDCCallbackParams) => {
2020
const token = await readFile(path.join(process.env.OIDC_TOKEN_DIR, tokenFile), {

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ import {
1111
type ChangeStream,
1212
type ChangeStreamDocument,
1313
type ChangeStreamOptions,
14-
type ResumeToken
15-
} from '../../mongodb';
16-
import {
1714
type Collection,
1815
type CommandStartedEvent,
1916
type Db,
@@ -23,7 +20,8 @@ import {
2320
MongoChangeStreamError,
2421
type MongoClient,
2522
MongoServerError,
26-
ReadPreference
23+
ReadPreference,
24+
type ResumeToken
2725
} from '../../mongodb';
2826
import * as mock from '../../tools/mongodb-mock/index';
2927
import { TestBuilder, UnifiedTestSuiteBuilder } from '../../tools/unified_suite_builder';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import {
1010
type CommandStartedEvent,
1111
type CommandSucceededEvent,
1212
type Document,
13+
LEGACY_HELLO_COMMAND,
1314
Long,
1415
type MongoClient,
1516
MongoNetworkError,
1617
ObjectId,
1718
Timestamp
1819
} from '../../mongodb';
19-
import { LEGACY_HELLO_COMMAND } from '../../mongodb';
2020
import * as mock from '../../tools/mongodb-mock/index';
2121
import { setupDatabase } from '../shared';
2222

test/integration/client-side-encryption/client_side_encryption.prose.06.corpus.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import * as path from 'path';
77
import * as process from 'process';
88

99
import { getCSFLEKMSProviders } from '../../csfle-kms-providers';
10-
import { type MongoClient, WriteConcern } from '../../mongodb';
11-
import { ClientEncryption } from '../../mongodb';
10+
import { ClientEncryption, type MongoClient, WriteConcern } from '../../mongodb';
1211
import { getEncryptExtraOptions } from '../../tools/utils';
1312

1413
describe('Client Side Encryption Prose Corpus Test', function () {

test/integration/client-side-encryption/client_side_encryption.prose.12.deadlock.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ import { readFileSync } from 'fs';
44
import * as path from 'path';
55
import * as process from 'process';
66

7-
import { type CommandStartedEvent, type MongoClient, type MongoClientOptions } from '../../mongodb';
8-
import { ClientEncryption } from '../../mongodb';
7+
import {
8+
ClientEncryption,
9+
type CommandStartedEvent,
10+
type MongoClient,
11+
type MongoClientOptions
12+
} from '../../mongodb';
913
import { type TestConfiguration } from '../../tools/runner/config';
1014
import { getEncryptExtraOptions } from '../../tools/utils';
1115
import { dropCollection } from '../shared';

test/integration/client-side-encryption/client_side_encryption.prose.14.decryption_events.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { expect } from 'chai';
33
import {
44
Binary,
55
BSON,
6+
ClientEncryption,
67
type CommandFailedEvent,
78
type CommandSucceededEvent,
89
type MongoClient,
910
MongoNetworkError
1011
} from '../../mongodb';
11-
import { ClientEncryption } from '../../mongodb';
1212
import { getEncryptExtraOptions } from '../../tools/utils';
1313

1414
const metadata: MongoDBMetadataUI = {

test/integration/client-side-encryption/client_side_encryption.prose.17.on_demand_gcp.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { expect } from 'chai';
22
import { env } from 'process';
33

4-
import { Binary } from '../../mongodb';
5-
import { ClientEncryption } from '../../mongodb';
6-
4+
import { Binary, ClientEncryption } from '../../mongodb';
75
const dataKeyOptions = {
86
masterKey: {
97
projectId: 'devprod-drivers',

0 commit comments

Comments
 (0)