From 0c0794db0fc872957cc95c293b65a3afdc60c20b Mon Sep 17 00:00:00 2001 From: yyjeqhc <1772413353@qq.com> Date: Tue, 6 May 2025 09:56:59 +0800 Subject: [PATCH] 1.update test_containers to 0.24.0 2.Change log level from debug to info to reduce verbose output. --- Cargo.toml | 2 +- libra/Cargo.toml | 2 +- libra/src/main.rs | 2 +- libra/src/utils/test.rs | 4 ++-- libra/tests/mega_test.rs | 4 ++-- mega/Cargo.toml | 2 +- mega/tests/lfs_test.rs | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2e2fb6796..0d1e60a06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,7 +104,7 @@ rayon = "1.10.0" byteorder = "1.5.0" bincode = "2.0" once_cell = "1.21" -testcontainers = "0.23" +testcontainers = "0.24" scopeguard = "1.2.0" serial_test = "3.2.0" sysinfo = "0.35.0" diff --git a/libra/Cargo.toml b/libra/Cargo.toml index ead5d9905..528ec1031 100644 --- a/libra/Cargo.toml +++ b/libra/Cargo.toml @@ -63,5 +63,5 @@ tempfile = { workspace = true } serial_test = { workspace = true } tokio = { workspace = true, features = ["macros", "process"] } tracing-test = { workspace = true } -testcontainers = { version = "0.23.0", features = ["http_wait","reusable-containers"] } +testcontainers = { workspace = true, features = ["http_wait","reusable-containers"] } reqwest = { version = "0.12.12", features = ["blocking"] } diff --git a/libra/src/main.rs b/libra/src/main.rs index 046a76105..26f55d2a9 100644 --- a/libra/src/main.rs +++ b/libra/src/main.rs @@ -8,7 +8,7 @@ fn main() { { tracing::subscriber::set_global_default( tracing_subscriber::fmt() - .with_max_level(tracing::Level::DEBUG) + .with_max_level(tracing::Level::INFO) .finish(), ) .unwrap(); diff --git a/libra/src/utils/test.rs b/libra/src/utils/test.rs index a66b337d3..1662fdb0d 100644 --- a/libra/src/utils/test.rs +++ b/libra/src/utils/test.rs @@ -109,10 +109,10 @@ pub async fn setup_with_new_libra_in(temp_path: impl AsRef) { }; command::init::init(args).await.unwrap(); } - +/// change the log level to reduce verbose output. pub fn init_debug_logger() { let _ = tracing_subscriber::fmt() - .with_max_level(tracing::Level::DEBUG) + .with_max_level(tracing::Level::INFO) .try_init(); // avoid multi-init } diff --git a/libra/tests/mega_test.rs b/libra/tests/mega_test.rs index 0ee9aa1d7..79e252759 100644 --- a/libra/tests/mega_test.rs +++ b/libra/tests/mega_test.rs @@ -80,11 +80,11 @@ async fn mega_container(mapping_port: u16) -> ContainerAsync { GenericImage::new("ubuntu", "latest") .with_exposed_port(mapping_port.tcp()) - .with_wait_for(WaitFor::Http( + .with_wait_for(WaitFor::Http(Box::new( HttpWaitStrategy::new("/") .with_method(Method::GET) .with_expected_status_code(404_u16), - )) + ))) .with_mapped_port(mapping_port, mapping_port.tcp()) // .with_copy_to("/root/mega", MEGA.clone()) // .with_copy_to("/root/config.toml", CONFIG.clone()) diff --git a/mega/Cargo.toml b/mega/Cargo.toml index 35002d2b9..87e0c12ba 100644 --- a/mega/Cargo.toml +++ b/mega/Cargo.toml @@ -44,6 +44,6 @@ serial_test = { workspace = true } lazy_static = { workspace = true } assert_cmd = { workspace = true } scopeguard = { workspace = true } -testcontainers = { version = "0.23.0", features = ["http_wait","reusable-containers"] } +testcontainers = { workspace = true, features = ["http_wait","reusable-containers"] } reqwest = { version = "0.12.12", features = ["blocking"] } http = { workspace = true } \ No newline at end of file diff --git a/mega/tests/lfs_test.rs b/mega/tests/lfs_test.rs index b80708fa2..1d29efde1 100644 --- a/mega/tests/lfs_test.rs +++ b/mega/tests/lfs_test.rs @@ -331,11 +331,11 @@ async fn mega_container(mapping_port: u16) -> ContainerAsync { GenericImage::new("ubuntu", "latest") .with_exposed_port(mapping_port.tcp()) - .with_wait_for(WaitFor::Http( + .with_wait_for(WaitFor::Http(Box::new( HttpWaitStrategy::new("/") .with_method(Method::GET) .with_expected_status_code(404_u16), - )) + ))) .with_mapped_port(mapping_port, mapping_port.tcp()) // .with_copy_to("/root/mega", MEGA.clone()) // .with_copy_to("/root/config.toml", CONFIG.clone())