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
51 lines
1.7 KiB
JavaScript
51 lines
1.7 KiB
JavaScript
/**
|
||
* 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
|
||
}
|
||
} |