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
This commit is contained in:
51
reports-app/frontend/tests/integration/global-teardown.js
Normal file
51
reports-app/frontend/tests/integration/global-teardown.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user