Merge pull request #22652 from overleaf/ar-handle-filestore-404-when-copying-in-saas

[web] Do not do filestore copy in SAAS

GitOrigin-RevId: 83456ca57f706246a86b997a038968aecfbae4c5
This commit is contained in:
Andrew Rumble
2024-12-23 12:01:06 +00:00
committed by Copybot
parent 20c6989074
commit e64e69f539
6 changed files with 142 additions and 22 deletions
@@ -120,7 +120,7 @@ describe('ProjectDuplicator', function () {
createdBlob: true,
path: this.file2Path,
file: this.newFile2,
url: this.filestoreUrl,
url: null,
},
]
@@ -304,7 +304,7 @@ describe('ProjectDuplicator', function () {
})
it('should copy files to the filestore', function () {
for (const file of [this.file0, this.file1, this.file2]) {
for (const file of [this.file0, this.file1]) {
this.FileStoreHandler.promises.copyFile.should.have.been.calledWith(
this.project._id,
file._id,
@@ -314,6 +314,15 @@ describe('ProjectDuplicator', function () {
}
})
it('should not copy files that have been sent to history-v1 to the filestore', function () {
this.FileStoreHandler.promises.copyFile.should.not.have.been.calledWith(
this.project._id,
this.file2._id,
this.newProject._id,
this.newFileId
)
})
it('should create a blank project', function () {
this.ProjectCreationHandler.promises.createBlankProject.should.have.been.calledWith(
this.owner._id,