Files
foxhunt/services/data_acquisition_service/tests/common/mod.rs
jgrusewski 845e77a8b0 fix(ci): Fix GitLab CI YAML syntax and PPOConfig compilation errors
Two critical fixes for successful pipeline execution:

1. GitLab CI YAML Syntax Fix (.gitlab-ci.yml:84-86)
   - Wrapped echo commands containing colons in single quotes
   - Root cause: YAML parser interprets `"text: value"` as key-value pairs
   - Solution: Single quotes force literal string interpretation
   - Impact: Enables Docker build pipeline execution

2. Trading Service Compilation Fix (trading_service/src/services/enhanced_ml.rs:1328-1348)
   - Added missing early stopping fields to PPOConfig initialization
   - Fields: early_stopping_enabled, early_stopping_patience, early_stopping_min_delta, early_stopping_min_epochs
   - Values: Disabled by default for paper trading (early_stopping_enabled: false)
   - Impact: Resolves pre-push hook compilation error

Technical Details:
- YAML Issue: Colons followed by spaces trigger mapping syntax parsing
- Single quotes preserve shell variable expansion while forcing literal YAML strings
- Early stopping config matches PPOConfig struct updates from Wave D
- Default values: patience=5, min_delta=0.001, min_epochs=10

Validated:
-  YAML syntax validated with PyYAML
-  trading_service compilation successful (cargo check)
-  Ready for GitLab CI/CD pipeline execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 00:20:00 +01:00

47 lines
1.5 KiB
Rust

//! Common test utilities for data_acquisition_service tests
//!
//! This module provides reusable mock types and helper functions for:
//! - Error handling and retry logic tests
//! - MinIO upload tests
//! - Download workflow tests
pub mod mock_downloader;
pub mod mock_service;
pub mod mock_uploader;
pub mod types;
// Re-export commonly used types
pub use types::{
DownloadRequest, DownloadResult, ScheduleResponse, StatusResponse, JobDetails,
UploadResult, ObjectMetadata, ScheduleDownloadRequest, ScheduleDownloadResponse,
DownloadJobDetails, GetDownloadStatusResponse, ListDownloadJobsResponse,
CancelDownloadResponse,
};
// Re-export helper functions from mock_downloader
pub use mock_downloader::{
create_test_downloader_with_network_issues,
create_test_downloader_with_retry_tracking,
create_test_downloader_with_rate_limiting,
create_test_downloader_with_invalid_auth,
create_test_downloader_with_timeout,
create_test_downloader_with_corrupted_data,
create_test_downloader_with_invalid_format,
create_test_downloader_with_limited_disk,
create_test_downloader_that_fails_midway,
create_test_downloader_with_error_type,
create_test_service_with_concurrency_limit,
};
// Re-export helper functions from mock_service
pub use mock_service::{
create_test_service,
create_test_service_with_corrupted_data,
};
// Re-export helper functions from mock_uploader
pub use mock_uploader::{
create_test_uploader,
create_test_uploader_with_failures,
};