From b1b83ec7e9817cfba71da8f6812b9be1695b5cec Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Wed, 15 May 2024 17:22:25 -0400 Subject: [PATCH] small fixes --- test/tools/runner/filters/client_encryption_filter.ts | 2 +- test/tools/runner/filters/idms_mock_server_filter.ts | 2 +- test/tools/runner/filters/mongodb_topology_filter.ts | 2 +- test/tools/runner/filters/mongodb_version_filter.ts | 2 +- test/tools/runner/filters/serverless_filter.ts | 2 +- test/tools/spec-runner/index.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/tools/runner/filters/client_encryption_filter.ts b/test/tools/runner/filters/client_encryption_filter.ts index a614f6f8e35..f6f844bd9de 100644 --- a/test/tools/runner/filters/client_encryption_filter.ts +++ b/test/tools/runner/filters/client_encryption_filter.ts @@ -22,7 +22,7 @@ export class ClientSideEncryptionFilter extends Filter { enabled: boolean; static version = null; - async initializeFilter(client: MongoClient, context: Record) { + override async initializeFilter(client: MongoClient, context: Record) { const CSFLE_KMS_PROVIDERS = process.env.CSFLE_KMS_PROVIDERS; let mongodbClientEncryption; try { diff --git a/test/tools/runner/filters/idms_mock_server_filter.ts b/test/tools/runner/filters/idms_mock_server_filter.ts index 40d34d93b95..6a3eeb11beb 100644 --- a/test/tools/runner/filters/idms_mock_server_filter.ts +++ b/test/tools/runner/filters/idms_mock_server_filter.ts @@ -38,7 +38,7 @@ async function isMockServerSetup() { export class IDMSMockServerFilter extends Filter { isRunning: boolean; - async initializeFilter() { + override async initializeFilter() { try { await isMockServerSetup(); this.isRunning = true; diff --git a/test/tools/runner/filters/mongodb_topology_filter.ts b/test/tools/runner/filters/mongodb_topology_filter.ts index c4e7035ab22..429b028b8b3 100755 --- a/test/tools/runner/filters/mongodb_topology_filter.ts +++ b/test/tools/runner/filters/mongodb_topology_filter.ts @@ -16,7 +16,7 @@ import { Filter } from './filter'; export class MongoDBTopologyFilter extends Filter { runtimeTopology: string; - async initializeFilter(client: MongoClient, context: Record) { + override async initializeFilter(client: MongoClient, context: Record) { const type = client.topology?.description.type; if (type == null) throw new Error('unexpected nullish type' + client.topology?.description); context.topologyType = type; diff --git a/test/tools/runner/filters/mongodb_version_filter.ts b/test/tools/runner/filters/mongodb_version_filter.ts index 235a1af8fd6..8d1eb6307ff 100755 --- a/test/tools/runner/filters/mongodb_version_filter.ts +++ b/test/tools/runner/filters/mongodb_version_filter.ts @@ -23,7 +23,7 @@ export class MongoDBVersionFilter extends Filter { this.version = null; } - async initializeFilter(client: MongoClient, context: Record) { + override async initializeFilter(client: MongoClient, context: Record) { const result = await client.db('admin').command({ buildInfo: true }); context.version = this.version = result.versionArray.slice(0, 3).join('.'); context.buildInfo = result; diff --git a/test/tools/runner/filters/serverless_filter.ts b/test/tools/runner/filters/serverless_filter.ts index 862d623484f..20347c0327a 100755 --- a/test/tools/runner/filters/serverless_filter.ts +++ b/test/tools/runner/filters/serverless_filter.ts @@ -22,7 +22,7 @@ export class ServerlessFilter extends Filter { this.serverless = !!process.env.SERVERLESS; } - async initializeFilter(client: MongoClient, context: Record) { + override async initializeFilter(client: MongoClient, context: Record) { if (this.serverless) { context.serverlessCredentials = { username: process.env.SERVERLESS_ATLAS_USER, diff --git a/test/tools/spec-runner/index.js b/test/tools/spec-runner/index.js index 7d53b288166..5e0175d91dd 100644 --- a/test/tools/spec-runner/index.js +++ b/test/tools/spec-runner/index.js @@ -15,7 +15,7 @@ const { HEARTBEAT_EVENTS } = require('../../mongodb'); const { isAnyRequirementSatisfied } = require('../unified-spec-runner/unified-utils'); -const ClientSideEncryptionFilter = require('../runner/filters/client_encryption_filter'); +const { ClientSideEncryptionFilter } = require('../runner/filters/client_encryption_filter'); // Promise.try alternative https://stackoverflow.com/questions/60624081/promise-try-without-bluebird/60624164?noredirect=1#comment107255389_60624164 function promiseTry(callback) { @@ -185,7 +185,7 @@ function generateTopologyTests(testSuites, testContext, filter) { let csfleFilterError = null; if (shouldRun && testContext.requiresCSFLE) { const csfleFilter = new ClientSideEncryptionFilter(); - csfleFilter.initializeFilter(null, {}, () => null); + await csfleFilter.initializeFilter(null, {}); try { if (!csfleFilter.filter({ metadata: { requires: { clientSideEncryption: true } } })) { shouldRun = false;