Browse Source

✅ test(minio): update minio integration tests to use stubEnv

- replace vi.mocked(process.env) with vi.stubEnv for environment variable mocking
- improve test reliability for SSL configuration tests
yourname 2 months ago
parent
commit
bf1a563cc8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/server/__integration_tests__/minio.integration.test.ts

+ 2 - 2
src/server/__integration_tests__/minio.integration.test.ts

@@ -248,8 +248,8 @@ describe('MinIO Integration Tests', () => {
 
     it('should handle SSL configuration', async () => {
       // Create new instance with SSL
-      vi.mocked(process.env).MINIO_USE_SSL = 'true';
-      vi.mocked(process.env).MINIO_PORT = '443';
+      vi.stubEnv('MINIO_USE_SSL', 'true');
+      vi.stubEnv('MINIO_PORT', '443');
 
       const sslService = new MinioService();
       const url = sslService.getFileUrl('test-bucket', 'file.txt');