mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
This reverts commit 4989ae920d8b7fd9e79623947b7c40bcc2e56d92. GitOrigin-RevId: 541d95bfeaa7ce820e8af67f646f013fe4fe5d21
This commit is contained in:
@@ -27,7 +27,6 @@ services:
|
||||
AWS_S3_PATH_STYLE: 'true'
|
||||
AWS_ACCESS_KEY_ID: OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY: OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
|
||||
AWS_REGION: us-east-1
|
||||
MINIO_ROOT_USER: MINIO_ROOT_USER
|
||||
MINIO_ROOT_PASSWORD: MINIO_ROOT_PASSWORD
|
||||
GCS_API_ENDPOINT: http://gcs:9090
|
||||
|
||||
@@ -44,7 +44,6 @@ services:
|
||||
AWS_S3_PATH_STYLE: 'true'
|
||||
AWS_ACCESS_KEY_ID: OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY: OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
|
||||
AWS_REGION: us-east-1
|
||||
MINIO_ROOT_USER: MINIO_ROOT_USER
|
||||
MINIO_ROOT_PASSWORD: MINIO_ROOT_PASSWORD
|
||||
GCS_API_ENDPOINT: http://gcs:9090
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
"types:check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.864.0",
|
||||
"@overleaf/logger": "*",
|
||||
"@overleaf/metrics": "*",
|
||||
"@overleaf/o-error": "*",
|
||||
|
||||
@@ -13,7 +13,6 @@ const streamifier = require('streamifier')
|
||||
chai.use(require('chai-as-promised'))
|
||||
const { ObjectId } = require('mongodb')
|
||||
const ChildProcess = require('node:child_process')
|
||||
const { ListObjectsV2Command } = require('@aws-sdk/client-s3')
|
||||
|
||||
const fsWriteFile = promisify(fs.writeFile)
|
||||
const fsStat = promisify(fs.stat)
|
||||
@@ -533,13 +532,19 @@ describe('Filestore', function () {
|
||||
...s3Config(),
|
||||
key: process.env.MINIO_ROOT_USER,
|
||||
secret: process.env.MINIO_ROOT_PASSWORD,
|
||||
})
|
||||
await s3._createBucket(bucketName)
|
||||
await s3._upload(bucketName, {
|
||||
Bucket: bucketName,
|
||||
Key: fileId,
|
||||
Body: constantFileContent,
|
||||
})
|
||||
})._getClientForBucket(bucketName)
|
||||
await s3
|
||||
.createBucket({
|
||||
Bucket: bucketName,
|
||||
})
|
||||
.promise()
|
||||
await s3
|
||||
.upload({
|
||||
Bucket: bucketName,
|
||||
Key: fileId,
|
||||
Body: constantFileContent,
|
||||
})
|
||||
.promise()
|
||||
})
|
||||
|
||||
it('should get the file from the specified bucket', async function () {
|
||||
@@ -1269,22 +1274,22 @@ describe('Filestore', function () {
|
||||
}) {
|
||||
await createRandomContent(fileUrl1)
|
||||
|
||||
const { Contents: dekEntries } = await s3Client.send(
|
||||
new ListObjectsV2Command({
|
||||
const { Contents: dekEntries } = await s3Client
|
||||
.listObjectsV2({
|
||||
Bucket: process.env.AWS_S3_USER_FILES_DEK_BUCKET_NAME,
|
||||
Prefix: `${projectId}/`,
|
||||
})
|
||||
)
|
||||
.promise()
|
||||
expect(dekEntries).to.have.length(dekBucketKeys.length)
|
||||
// Order is not predictable, use members
|
||||
expect(dekEntries.map(o => o.Key)).to.have.members(dekBucketKeys)
|
||||
|
||||
const { Contents: userFilesEntries } = await s3Client.send(
|
||||
new ListObjectsV2Command({
|
||||
const { Contents: userFilesEntries } = await s3Client
|
||||
.listObjectsV2({
|
||||
Bucket: backendSettings.stores.user_files,
|
||||
Prefix: `${projectId}/`,
|
||||
})
|
||||
)
|
||||
.promise()
|
||||
expect(userFilesEntries).to.have.length(userFilesBucketKeys.length)
|
||||
// Order is not predictable, use members
|
||||
expect(userFilesEntries.map(o => o.Key)).to.have.members(
|
||||
|
||||
Reference in New Issue
Block a user