|
|
@@ -57,16 +57,24 @@ describe('File API Integration Tests', () => {
|
|
|
path: '1/test-uuid-123-test.txt',
|
|
|
uploadTime: new Date(),
|
|
|
createdAt: new Date(),
|
|
|
- updatedAt: new Date()
|
|
|
+ updatedAt: new Date(),
|
|
|
+ fullUrl: Promise.resolve('https://minio.example.com/d8dai/1/test-uuid-123-test.txt'),
|
|
|
+ uploadUser: {} as any,
|
|
|
+ lastUpdated: null
|
|
|
},
|
|
|
uploadPolicy: {
|
|
|
+ 'x-amz-algorithm': 'AWS4-HMAC-SHA256',
|
|
|
+ 'x-amz-credential': 'test-credential',
|
|
|
+ 'x-amz-date': '20250101T120000Z',
|
|
|
+ 'x-amz-security-token': 'test-token',
|
|
|
+ policy: 'test-policy',
|
|
|
+ 'x-amz-signature': 'test-signature',
|
|
|
host: 'https://minio.example.com',
|
|
|
key: '1/test-uuid-123-test.txt',
|
|
|
bucket: 'd8dai'
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- // mockFileService.createFile = vi.fn().mockResolvedValue(mockResponse);
|
|
|
vi.mocked(mockFileService.createFile).mockResolvedValue(mockResponse)
|
|
|
|
|
|
const response = await client.files['upload-policy'].$post({
|