- Rename tli/ directory to fxt/, update package + binary name to "fxt" - Replace all `use tli::` → `use fxt::` across 52 Rust files - Update build.rs proto paths (tli/proto → fxt/proto) in 6 services - Update Dockerfiles, CI workflows, deploy.sh for new paths - Delete ~170 legacy shell scripts (kept 15 essential ones) - Delete RunPod Python client (runpod/), tests (tests/runpod/) - Delete foxhunt-deploy crate (RunPod-only deployment tool) - Delete terraform/runpod/ (moved to Scaleway) - Delete ML Python hyperopt scripts (replaced by Rust Argmin PSO) - Delete .gitlab-ci.yml (using GitHub + Gitea) - Remove foxhunt-deploy from workspace members 504 files changed, -74,355 lines of legacy code removed. Workspace compiles clean (0 errors, 0 warnings). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
101 lines
3.0 KiB
Markdown
101 lines
3.0 KiB
Markdown
# TLI Integration Tests - Quick Start Guide
|
|
|
|
## Quick Test Execution
|
|
|
|
### Run All Integration Tests
|
|
```bash
|
|
cd /home/jgrusewski/Work/foxhunt/tli
|
|
cargo test --test integration
|
|
```
|
|
|
|
### Run Specific Test Categories
|
|
```bash
|
|
# Service communication tests
|
|
cargo test --test integration service_integration
|
|
|
|
# Database operation tests
|
|
cargo test --test integration database_integration
|
|
|
|
# End-to-end workflow tests
|
|
cargo test --test integration end_to_end
|
|
|
|
# Error handling and resilience tests
|
|
cargo test --test integration error_handling
|
|
|
|
# Performance and load tests
|
|
cargo test --test integration performance
|
|
```
|
|
|
|
### Run with Detailed Output
|
|
```bash
|
|
# See test output and logs
|
|
RUST_LOG=info cargo test --test integration -- --nocapture
|
|
|
|
# Debug mode with full logging
|
|
RUST_LOG=debug cargo test --test integration -- --nocapture
|
|
```
|
|
|
|
## Test Structure Summary
|
|
|
|
| Test File | Purpose | Key Test Areas |
|
|
|-----------|---------|----------------|
|
|
| `service_integration_tests.rs` | Service-to-service communication | Trading orders, backtesting, config management, event streaming |
|
|
| `database_integration_tests.rs` | Database operations | SQLite config, PostgreSQL events, InfluxDB metrics, transactions |
|
|
| `end_to_end_tests.rs` | Complete business workflows | Order lifecycle, backtest workflow, auth flow, event storage |
|
|
| `error_handling_tests.rs` | System resilience | Service failures, network issues, invalid data, circuit breakers |
|
|
| `performance_tests.rs` | Load and performance | Concurrent requests, HFT simulation, stress testing |
|
|
|
|
## Environment Variables (Optional)
|
|
|
|
```bash
|
|
# PostgreSQL testing (if available)
|
|
export TEST_POSTGRES_URL="postgresql://user:password@localhost:5432/test_db"
|
|
|
|
# InfluxDB testing (if available)
|
|
export TEST_INFLUX_URL="http://localhost:8086"
|
|
export TEST_INFLUX_TOKEN="your_token"
|
|
export TEST_INFLUX_ORG="test_org"
|
|
|
|
# Enable real-time tests
|
|
export TLI_ENABLE_RT_TESTS="true"
|
|
|
|
# Logging
|
|
export RUST_LOG="info"
|
|
```
|
|
|
|
## Test Results Interpretation
|
|
|
|
### Success Indicators
|
|
- ✅ All tests pass
|
|
- ✅ Performance targets met
|
|
- ✅ Error handling validates correctly
|
|
- ✅ No memory leaks or resource issues
|
|
|
|
### Common Issues
|
|
- **Port conflicts**: Change mock server ports in test config
|
|
- **Database unavailable**: Tests will skip PostgreSQL/InfluxDB if not configured
|
|
- **Timeouts**: May indicate performance issues or resource constraints
|
|
|
|
## Performance Benchmarks
|
|
|
|
### Expected Results
|
|
- **Order Submission**: < 10ms P99 latency, > 1000 RPS throughput
|
|
- **Market Data**: > 10,000 updates/second processing
|
|
- **Database Operations**: < 5ms P99 for configuration queries
|
|
- **Memory Usage**: < 512MB under load
|
|
|
|
## Full Documentation
|
|
|
|
See `INTEGRATION_TEST_GUIDE.md` for comprehensive documentation including:
|
|
- Detailed test descriptions
|
|
- Setup requirements
|
|
- Troubleshooting guide
|
|
- Contributing guidelines
|
|
- CI/CD integration
|
|
|
|
## Support
|
|
|
|
For issues or questions:
|
|
1. Check the troubleshooting section in `INTEGRATION_TEST_GUIDE.md`
|
|
2. Review test logs with `RUST_LOG=debug`
|
|
3. Verify environment setup and dependencies |