Silences warnings from mongodb client (#5025)

* Silences warnings from mongodb client

* Update count, delete and finds to recommended implementations

* With new parser, readPref will be null by default

* Update flaky specs wih async/await style

* Adds gridstore adapter spec

* Use GridFSBucketStorage adapter
This commit is contained in:
Florent Vilmart
2018-09-04 16:15:09 -04:00
committed by GitHub
parent d83a0b6808
commit a42101531a
14 changed files with 265 additions and 109 deletions

View File

@@ -18,7 +18,7 @@ import DatabaseController from './DatabaseController';
import SchemaCache from './SchemaCache';
// Adapters
import { GridStoreAdapter } from '../Adapters/Files/GridStoreAdapter';
import { GridFSBucketAdapter } from '../Adapters/Files/GridFSBucketAdapter';
import { WinstonLoggerAdapter } from '../Adapters/Logger/WinstonLoggerAdapter';
import { InMemoryCacheAdapter } from '../Adapters/Cache/InMemoryCacheAdapter';
import { AnalyticsAdapter } from '../Adapters/Analytics/AnalyticsAdapter';
@@ -96,7 +96,7 @@ export function getFilesController(
throw 'When using an explicit database adapter, you must also use an explicit filesAdapter.';
}
const filesControllerAdapter = loadAdapter(filesAdapter, () => {
return new GridStoreAdapter(databaseURI);
return new GridFSBucketAdapter(databaseURI);
});
return new FilesController(filesControllerAdapter, appId, {
preserveFileName,