Merge pull request #16218 from overleaf/csh-issue-11625-mongo-ug-5-project-history

Upgrade mongodb module for project-history

GitOrigin-RevId: 18782896b46b2b0512a1ce50215bb98ac3d46cea
This commit is contained in:
Christopher Hoskin
2023-12-18 09:04:07 +00:00
committed by Copybot
parent 78b7bb80f5
commit ced8a923c0
28 changed files with 130 additions and 193 deletions
@@ -1,6 +1,7 @@
import sinon from 'sinon'
import { strict as esmock } from 'esmock'
import { ObjectId } from 'mongodb'
import mongodb from 'mongodb-legacy'
const { ObjectId } = mongodb
const MODULE_PATH = '../../../../app/js/HttpController.js'
@@ -106,7 +107,7 @@ describe('HttpController', function () {
describe('initializeProject', function () {
beforeEach(function () {
this.historyId = ObjectId().toString()
this.historyId = new ObjectId().toString()
this.req = { body: { historyId: this.historyId } }
this.HistoryStoreManager.initializeProject.yields(null, this.historyId)
this.HttpController.initializeProject(this.req, this.res, this.next)
@@ -478,7 +479,7 @@ describe('HttpController', function () {
params: {
project_id: this.projectId,
user_id: this.userId,
label_id: (this.label_id = ObjectId()),
label_id: (this.label_id = new ObjectId()),
},
}
this.HttpController.deleteLabel(this.req, this.res, this.next)