This commit is contained in:
likewu
2026-01-10 10:19:11 +08:00
parent ecf7a2e344
commit e15c619ed5
4 changed files with 25 additions and 1 deletions

19
.vscode/launch.json vendored
View File

@@ -121,6 +121,25 @@
"rust"
],
},
{
"type": "lldb",
"request": "launch",
"name": "Debug test_lifecycle_transition_basic",
"cargo": {
"args": [
"test",
"-p",
"rustfs-scanner",
"--test",
"lifecycle_integration_test",
"serial_tests::test_lifecycle_transition_basic",
"-j",
"1"
]
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"name": "Debug executable target/debug/test",
"type": "lldb",

1
Cargo.lock generated
View File

@@ -7619,6 +7619,7 @@ dependencies = [
"path-clean",
"rand 0.10.0-rc.5",
"rmp-serde",
"rustfs-ahm",
"rustfs-common",
"rustfs-config",
"rustfs-ecstore",

View File

@@ -50,6 +50,7 @@ rustfs-filemeta = { workspace = true }
rustfs-madmin = { workspace = true }
tokio-util = { workspace = true }
rustfs-ecstore = { workspace = true }
rustfs-ahm = { workspace = true }
http = { workspace = true }
rand = { workspace = true }
s3s = { workspace = true }

View File

@@ -22,6 +22,7 @@ use rustfs_ecstore::{
store_api::{MakeBucketOptions, ObjectIO, ObjectOptions, PutObjReader, StorageAPI},
tier::tier_config::{TierConfig, TierMinIO, TierType},
};
use rustfs_ahm::{heal::storage::ECStoreHealStorage, init_heal_manager};
use rustfs_scanner::scanner::init_data_scanner;
use serial_test::serial;
use std::{
@@ -52,7 +53,7 @@ async fn setup_test_env() -> (Vec<PathBuf>, Arc<ECStore>) {
}
// create temp dir as 4 disks with unique base dir
let test_base_dir = format!("/tmp/rustfs_ahm_lifecycle_test_{}", uuid::Uuid::new_v4());
let test_base_dir = format!("/tmp/rustfs_scanner_lifecycle_test_{}", uuid::Uuid::new_v4());
let temp_dir = std::path::PathBuf::from(&test_base_dir);
if temp_dir.exists() {
fs::remove_dir_all(&temp_dir).await.ok();
@@ -397,6 +398,8 @@ mod serial_tests {
let ctx = CancellationToken::new();
// Start scanner
let heal_storage = Arc::new(ECStoreHealStorage::new(ecstore.clone()));
init_heal_manager(heal_storage, None).await;
init_data_scanner(ctx.clone(), ecstore.clone()).await;
println!("✅ Scanner started");