Winston 3 upgrade (#5496)
* ⚡ Release 3.1.3 (#5267) * ⚡ Release 3.1.3 * Update CHANGELOG.md * ⬆️ Bump winston and winston-daily-rotate-file Bumps [winston](https://github.com/winstonjs/winston) and [winston-daily-rotate-file](https://github.com/winstonjs/winston-daily-rotate-file). These dependencies needed to be updated together. Updates `winston` from 2.4.4 to 3.1.0 - [Release notes](https://github.com/winstonjs/winston/releases) - [Changelog](https://github.com/winstonjs/winston/blob/master/CHANGELOG.md) - [Commits](https://github.com/winstonjs/winston/compare/2.4.4...3.1.0) Updates `winston-daily-rotate-file` from 1.7.2 to 3.5.1 - [Release notes](https://github.com/winstonjs/winston-daily-rotate-file/releases) - [Commits](https://github.com/winstonjs/winston-daily-rotate-file/compare/v1.7.2...v3.5.1) Signed-off-by: dependabot[bot] <support@dependabot.com> * Rewrote WinstonLogger to work with winston 3.x api * Changed winston logger test to use winston-transport * Added winston-transport dependency * Close and remove transports before adding them again * Changed to strict equal * Override adapter name * Updated and added getLogs tests * Bump winston and winston-daily-rotate-file Bumps [winston](https://github.com/winstonjs/winston) and [winston-daily-rotate-file](https://github.com/winstonjs/winston-daily-rotate-file). These dependencies needed to be updated together. Updates `winston` from 2.4.4 to 3.2.0 - [Release notes](https://github.com/winstonjs/winston/releases) - [Changelog](https://github.com/winstonjs/winston/blob/master/CHANGELOG.md) - [Commits](https://github.com/winstonjs/winston/compare/2.4.4...3.2.0) Updates `winston-daily-rotate-file` from 1.7.2 to 3.6.0 - [Release notes](https://github.com/winstonjs/winston-daily-rotate-file/releases) - [Commits](https://github.com/winstonjs/winston-daily-rotate-file/compare/v1.7.2...v3.6.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * Fixed tests, updated parse logging * Fixed tests, better error logging * Fix failing tests * Updates as per review
This commit is contained in:
@@ -6,6 +6,11 @@ const { MongoClient } = require('mongodb');
|
||||
const databaseURI =
|
||||
'mongodb://localhost:27017/parseServerMongoAdapterTestDatabase';
|
||||
|
||||
const fakeClient = {
|
||||
s: { options: { dbName: null } },
|
||||
db: () => null,
|
||||
};
|
||||
|
||||
// These tests are specific to the mongo storage adapter + mongo storage format
|
||||
// and will eventually be moved into their own repo
|
||||
describe_only_db('mongo')('MongoStorageAdapter', () => {
|
||||
@@ -16,7 +21,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
|
||||
});
|
||||
|
||||
it('auto-escapes symbols in auth information', () => {
|
||||
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(null));
|
||||
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(fakeClient));
|
||||
new MongoStorageAdapter({
|
||||
uri:
|
||||
'mongodb://user!with@+ symbols:password!with@+ symbols@localhost:1234/parse',
|
||||
@@ -28,7 +33,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
|
||||
});
|
||||
|
||||
it("doesn't double escape already URI-encoded information", () => {
|
||||
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(null));
|
||||
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(fakeClient));
|
||||
new MongoStorageAdapter({
|
||||
uri:
|
||||
'mongodb://user!with%40%2B%20symbols:password!with%40%2B%20symbols@localhost:1234/parse',
|
||||
@@ -41,7 +46,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
|
||||
|
||||
// https://github.com/parse-community/parse-server/pull/148#issuecomment-180407057
|
||||
it('preserves replica sets', () => {
|
||||
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(null));
|
||||
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(fakeClient));
|
||||
new MongoStorageAdapter({
|
||||
uri:
|
||||
'mongodb://test:testpass@ds056315-a0.mongolab.com:59325,ds059315-a1.mongolab.com:59315/testDBname?replicaSet=rs-ds059415',
|
||||
|
||||
Reference in New Issue
Block a user