[web] remove deledFiles collection (#25750)

* [history-v1] remove processing of deleted files when back-filling hashes

* [web] remove deledFiles collection

GitOrigin-RevId: 7c080e564f7d7acb33ebe7ebe012f415a847d0df
This commit is contained in:
Jakob Ackermann
2025-05-22 10:15:52 +01:00
committed by Copybot
parent 8926a64ba6
commit dfed87723f
21 changed files with 155 additions and 809 deletions

View File

@@ -133,7 +133,6 @@ describe('ProjectEntityUpdateHandler', function () {
addFolder: sinon.stub(),
_confirmFolder: sinon.stub(),
_putElement: sinon.stub(),
_insertDeletedFileReference: sinon.stub(),
replaceFileWithNew: sinon.stub(),
mkdirp: sinon.stub(),
moveEntity: sinon.stub(),
@@ -2572,7 +2571,6 @@ describe('ProjectEntityUpdateHandler', function () {
this.ProjectEntityUpdateHandler.promises.unsetRootDoc = sinon
.stub()
.resolves()
this.ProjectEntityMongoUpdateHandler.promises._insertDeletedFileReference.resolves()
})
describe('a file', function () {
@@ -2592,12 +2590,6 @@ describe('ProjectEntityUpdateHandler', function () {
)
})
it('should insert the file into the deletedFiles collection', function () {
this.ProjectEntityMongoUpdateHandler.promises._insertDeletedFileReference
.calledWith(this.project._id, this.entity)
.should.equal(true)
})
it('should not delete the file from FileStoreHandler', function () {
this.FileStoreHandler.promises.deleteFile
.calledWith(projectId, this.entityId)
@@ -2696,7 +2688,6 @@ describe('ProjectEntityUpdateHandler', function () {
}
this.ProjectEntityUpdateHandler._cleanUpDoc = sinon.stub().resolves()
this.ProjectEntityUpdateHandler._cleanUpFile = sinon.stub().resolves()
const path = '/folder'
this.newProject = 'new-project'
this.subtreeListing =
@@ -2711,17 +2702,6 @@ describe('ProjectEntityUpdateHandler', function () {
)
})
it('should clean up all sub files', function () {
this.ProjectEntityUpdateHandler._cleanUpFile.should.have.been.calledWith(
this.project,
this.file1
)
this.ProjectEntityUpdateHandler._cleanUpFile.should.have.been.calledWith(
this.project,
this.file2
)
})
it('should clean up all sub docs', function () {
this.ProjectEntityUpdateHandler._cleanUpDoc
.calledWith(