Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { MongoMemoryReplSet } = require('mongodb-memory-server');
const errors = require('../../../../lib/errors');
const logger = new werelogs.Logger('MongoClientInterface', 'debug', 'debug');
const BucketInfo = require('../../../../lib/models/BucketInfo');
const ObjectMD = require('../../../../lib/models/ObjectMD');
const MongoClientInterface =
require('../../../../lib/storage/metadata/mongoclient/MongoClientInterface');
const MetadataWrapper =
require('../../../../lib/storage/metadata/MetadataWrapper');
const implName = 'mongodb';
const dbName = 'metadata';
const bucketName = 'testbucket';
const mongoserver = new MongoMemoryReplSet({
debug: false,
instanceOpts: [
{ port: 27018 },
],
replSet: {
name: 'rs0',
count: 1,
dbName,
storageEngine: 'ephemeralForTest',
},
});
describe('MongoClientInterface', () => {
let metadata;
before(done => {
mongoserver.waitUntilRunning().then(() => {