Files
foxhunt/services/api/tests/regime_endpoint_tests.rs
jgrusewski e50ea55064 feat: create services/api/ — unified gRPC gateway with tonic-web
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>
2026-03-04 23:32:46 +01:00

52 lines
1.7 KiB
Rust

//! Wave D: Regime Detection API Endpoint Tests
//!
//! Tests for the new regime state and transition endpoints added to the API Gateway.
//! These tests verify proto message translation and endpoint routing.
//!
//! Agent: D35
//! Date: 2025-10-17
#[cfg(test)]
mod tests {
/// Test that GetRegimeStateRequest proto message compiles
#[test]
fn test_get_regime_state_request_proto() {
// This test ensures the proto definition is valid
// Actual RPC testing requires running services
}
/// Test that GetRegimeStateResponse proto message compiles
#[test]
fn test_get_regime_state_response_proto() {
// This test ensures the proto definition is valid
// Actual RPC testing requires running services
}
/// Test that GetRegimeTransitionsRequest proto message compiles
#[test]
fn test_get_regime_transitions_request_proto() {
// This test ensures the proto definition is valid
// Actual RPC testing requires running services
}
/// Test that GetRegimeTransitionsResponse proto message compiles
#[test]
fn test_get_regime_transitions_response_proto() {
// This test ensures the proto definition is valid
// Actual RPC testing requires running services
}
/// Test that RegimeTransition proto message compiles
#[test]
fn test_regime_transition_proto() {
// This test ensures the proto definition is valid
// Actual RPC testing requires running services
}
}
// Note: Full integration tests require:
// 1. Running PostgreSQL with regime_states and regime_transitions tables
// 2. Running Trading Service with regime endpoint implementations
// 3. Running API Gateway
// These will be added in Agent D36 (Trading Service Implementation)