fix: 修复合并后的测试兼容性
- 更新 handler_test.rs 使用 RwLock<MockRouter> - 确保所有 43 个测试通过 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use axum::{
|
||||
body::Body,
|
||||
extract::Request,
|
||||
@@ -42,7 +42,7 @@ fn create_app_state_with_rules(rules: Vec<&str>) -> Arc<AppState> {
|
||||
}
|
||||
|
||||
let router = MockRouter::new(index);
|
||||
Arc::new(AppState { router })
|
||||
Arc::new(AppState { router: RwLock::new(router) })
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user