Skip to content

Commit 62cd9a3

Browse files
author
waleed
committed
remove dated tests
1 parent 848c2ae commit 62cd9a3

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

apps/sim/app/api/files/presigned/route.test.ts

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -214,33 +214,6 @@ describe('/api/files/presigned', () => {
214214
expect(data.directUploadSupported).toBe(true)
215215
})
216216

217-
it('should generate chat S3 presigned URL with chat prefix and direct path', async () => {
218-
setupFileApiMocks({
219-
cloudEnabled: true,
220-
storageProvider: 's3',
221-
})
222-
223-
const { POST } = await import('@/app/api/files/presigned/route')
224-
225-
const request = new NextRequest('http://localhost:3000/api/files/presigned?type=chat', {
226-
method: 'POST',
227-
body: JSON.stringify({
228-
fileName: 'chat-logo.png',
229-
contentType: 'image/png',
230-
fileSize: 4096,
231-
}),
232-
})
233-
234-
const response = await POST(request)
235-
const data = await response.json()
236-
237-
expect(response.status).toBe(200)
238-
expect(data.fileInfo.key).toMatch(/^chat\/.*chat-logo\.png$/)
239-
expect(data.fileInfo.path).toMatch(/\/api\/files\/serve\/s3\/.+\?context=chat$/)
240-
expect(data.presignedUrl).toBeTruthy()
241-
expect(data.directUploadSupported).toBe(true)
242-
})
243-
244217
it('should generate Azure Blob presigned URL successfully', async () => {
245218
setupFileApiMocks({
246219
cloudEnabled: true,
@@ -273,33 +246,6 @@ describe('/api/files/presigned', () => {
273246
expect(data.directUploadSupported).toBe(true)
274247
})
275248

276-
it('should generate chat Azure Blob presigned URL with chat prefix and direct path', async () => {
277-
setupFileApiMocks({
278-
cloudEnabled: true,
279-
storageProvider: 'blob',
280-
})
281-
282-
const { POST } = await import('@/app/api/files/presigned/route')
283-
284-
const request = new NextRequest('http://localhost:3000/api/files/presigned?type=chat', {
285-
method: 'POST',
286-
body: JSON.stringify({
287-
fileName: 'chat-logo.png',
288-
contentType: 'image/png',
289-
fileSize: 4096,
290-
}),
291-
})
292-
293-
const response = await POST(request)
294-
const data = await response.json()
295-
296-
expect(response.status).toBe(200)
297-
expect(data.fileInfo.key).toMatch(/^chat\/.*chat-logo\.png$/)
298-
expect(data.fileInfo.path).toMatch(/\/api\/files\/serve\/blob\/.+\?context=chat$/)
299-
expect(data.presignedUrl).toBeTruthy()
300-
expect(data.directUploadSupported).toBe(true)
301-
})
302-
303249
it('should return error for unknown storage provider', async () => {
304250
setupFileApiMocks({
305251
cloudEnabled: true,

0 commit comments

Comments
 (0)