✅ Wave 112: Test suite improvements and fixes
- Rewrote audit_compliance.rs: Proper behavior tests (no stubs) - Agent 9, 19 - Enhanced audit_trail_persistence_test.rs: Comprehensive persistence validation - Fixed audit_trails.rs: Improved error handling and event processing - Updated rate limiter tests: Result unwrapping and stress test improvements - Optimized full_trading_cycle.rs benchmark: Better performance measurement - All tests follow anti-workaround protocol (no placeholders, actual validations)
This commit is contained in:
@@ -247,7 +247,7 @@ pub struct PerformanceMetrics {
|
||||
}
|
||||
|
||||
/// Risk levels for audit events
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
/// RiskLevel
|
||||
///
|
||||
/// Auto-generated documentation placeholder - enhance with specifics
|
||||
@@ -795,8 +795,28 @@ pub struct AuditTrailQuery {
|
||||
pub sort_order: SortOrder,
|
||||
}
|
||||
|
||||
impl Default for AuditTrailQuery {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
start_time: chrono::Utc::now() - chrono::Duration::hours(24),
|
||||
end_time: chrono::Utc::now(),
|
||||
event_types: None,
|
||||
transaction_id: None,
|
||||
order_id: None,
|
||||
actor: None,
|
||||
symbol: None,
|
||||
account_id: None,
|
||||
risk_level: None,
|
||||
compliance_tags: None,
|
||||
limit: Some(100),
|
||||
offset: None,
|
||||
sort_order: SortOrder::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Sort order for queries
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
/// SortOrder
|
||||
///
|
||||
/// Auto-generated documentation placeholder - enhance with specifics
|
||||
@@ -804,6 +824,7 @@ pub enum SortOrder {
|
||||
/// Ascending by timestamp
|
||||
TimestampAsc,
|
||||
/// Descending by timestamp
|
||||
#[default]
|
||||
TimestampDesc,
|
||||
/// By event type
|
||||
EventType,
|
||||
|
||||
Reference in New Issue
Block a user