Files
roa2web-service-auto/reports-app/frontend/tests/integration/global-teardown.js
Marius Mutu 6b13ffa183 Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot
Modern ERP Reports Application with microservices architecture

Tech Stack:
- Backend: FastAPI + python-oracledb (Oracle DB integration)
- Frontend: Vue.js 3 + PrimeVue + Vite
- Telegram Bot: python-telegram-bot + SQLite
- Infrastructure: Shared database pool, JWT authentication, SSH tunnel

Features:
- FastAPI backend with async Oracle connection pool
- Vue.js 3 responsive frontend with PrimeVue components
- Telegram bot alternative interface
- Microservices architecture with shared components
- Complete deployment support (Linux Docker + Windows IIS)
- Comprehensive testing (Playwright E2E + pytest)

Repository Structure:
- reports-app/ - Main application (backend, frontend, telegram-bot)
- shared/ - Shared components (database pool, auth, utils)
- deployment/ - Deployment scripts (Linux & Windows)
- docs/ - Project documentation
- security/ - Security scanning and git hooks
2025-10-25 14:55:08 +03:00

51 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Global teardown for real API integration tests
* Cleanup resources and generate final reports
*/
import { writeFileSync } from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default async function globalTeardown() {
console.log('🧹 Starting global teardown for integration tests...');
try {
// Generate final test report
const testReport = {
testRun: {
timestamp: new Date().toISOString(),
type: 'integration',
environment: 'development'
},
setup: global.__INTEGRATION_SETUP__ || {},
summary: {
message: 'Integration test run completed',
backend: 'http://localhost:8000',
frontend: 'http://localhost:3001',
sshTunnel: 'managed externally'
}
};
// Write final report
const reportPath = path.join(__dirname, '../../test-results/integration-summary.json');
try {
writeFileSync(reportPath, JSON.stringify(testReport, null, 2));
console.log(`📊 Integration test summary written to: ${reportPath}`);
} catch (error) {
console.warn('⚠️ Could not write integration test summary:', error.message);
}
// Log cleanup completion
console.log('✅ Global teardown completed');
console.log(' SSH tunnel and services left running for continued development');
console.log(' Use ./ssh_tunnel.sh stop to manually stop the SSH tunnel if needed');
} catch (error) {
console.error('❌ Global teardown encountered errors:', error.message);
// Don't fail teardown on non-critical errors
}
}