Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed May 15, 2024
1 parent 5859c20 commit 4ef4db3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/tools/runner/filters/client_encryption_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ClientSideEncryptionFilter extends Filter {
enabled: boolean;
static version = null;

async initializeFilter(client: MongoClient, context: Record<string, any>) {
override async initializeFilter(client: MongoClient, context: Record<string, any>) {
const CSFLE_KMS_PROVIDERS = process.env.CSFLE_KMS_PROVIDERS;
let mongodbClientEncryption;
try {
Expand Down
2 changes: 1 addition & 1 deletion test/tools/runner/filters/idms_mock_server_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/tools/runner/filters/mongodb_topology_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Filter } from './filter';
export class MongoDBTopologyFilter extends Filter {
runtimeTopology: string;

async initializeFilter(client: MongoClient, context: Record<string, any>) {
override async initializeFilter(client: MongoClient, context: Record<string, any>) {
const type = client.topology?.description.type;
if (type == null) throw new Error('unexpected nullish type' + client.topology?.description);
context.topologyType = type;
Expand Down
2 changes: 1 addition & 1 deletion test/tools/runner/filters/mongodb_version_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class MongoDBVersionFilter extends Filter {
this.version = null;
}

async initializeFilter(client: MongoClient, context: Record<string, any>) {
override async initializeFilter(client: MongoClient, context: Record<string, any>) {
const result = await client.db('admin').command({ buildInfo: true });
context.version = this.version = result.versionArray.slice(0, 3).join('.');
context.buildInfo = result;
Expand Down
2 changes: 1 addition & 1 deletion test/tools/runner/filters/serverless_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ServerlessFilter extends Filter {
this.serverless = !!process.env.SERVERLESS;
}

async initializeFilter(client: MongoClient, context: Record<string, any>) {
override async initializeFilter(client: MongoClient, context: Record<string, any>) {
if (this.serverless) {
context.serverlessCredentials = {
username: process.env.SERVERLESS_ATLAS_USER,
Expand Down
4 changes: 2 additions & 2 deletions test/tools/spec-runner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4ef4db3

Please sign in to comment.