Copied from api_gateway, removed REST handlers (port 8080), added tonic-web + CORS for grpc-web browser access. Binary renamed: api-gateway → api Changes: - Package name: api-gateway → api - Deleted src/handlers/ (REST ML endpoints on port 8080) - Added tonic-web 0.13 + tower-http CORS layer - Server::builder().accept_http1(true) for grpc-web - CORS_ORIGINS env var (default http://localhost:5173) - Metrics server on port 9091 (axum) preserved - All 95 lib tests pass, 0 clippy warnings - Added services/api to workspace members Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
847 B
Rust
25 lines
847 B
Rust
//! gRPC Error Handling Integration Tests
|
|
//!
|
|
//! NOTE: These tests are currently disabled because they reference non-existent proxy types.
|
|
//! The api exports TradingServiceProxy, BacktestingServiceProxy, etc., but not a
|
|
//! generic ServiceProxy type as these tests assume.
|
|
//!
|
|
//! To enable these tests, either:
|
|
//! 1. Create the missing proxy abstractions
|
|
//! 2. Rewrite tests to use actual service-specific proxies
|
|
//! 3. Test error handling via deployed services
|
|
|
|
#![cfg(test)]
|
|
#![allow(dead_code, unused_imports)]
|
|
|
|
use anyhow::Result;
|
|
use tonic::{Code, Request, Status};
|
|
|
|
#[tokio::test]
|
|
#[ignore = "Missing proxy types - requires refactoring to use actual service proxies"]
|
|
async fn test_placeholder() -> Result<()> {
|
|
// Placeholder to keep test file valid
|
|
// Actual error handling tests should use real service proxies
|
|
Ok(())
|
|
}
|