diff --git a/crates/e2e_test/src/data_usage_test.rs b/crates/e2e_test/src/data_usage_test.rs index 2dfd56eb5..141ab29c7 100644 --- a/crates/e2e_test/src/data_usage_test.rs +++ b/crates/e2e_test/src/data_usage_test.rs @@ -59,7 +59,6 @@ where /// Regression test for data usage accuracy (issue #1012). /// Launches rustfs, writes 1000 objects, then asserts admin data usage reports the full count. #[tokio::test(flavor = "multi_thread")] -#[ignore = "Starts a rustfs server and requires awscurl; enable when running full E2E"] async fn data_usage_reports_all_objects() -> Result<(), Box> { init_logging(); @@ -86,28 +85,20 @@ async fn data_usage_reports_all_objects() -> Result<(), Box= 1000 && bucket_usage.objects_count >= 1000) + .map(|bucket_usage| usage.objects_total_count == 1000 && bucket_usage.objects_count == 1000) .unwrap_or(false) }) .await?; - // Assert total object count and per-bucket count are not truncated + // Assert total object count and per-bucket count are exact. let bucket_usage = usage .buckets_usage .get(TEST_BUCKET) .cloned() .expect("bucket usage should exist"); - assert!( - usage.objects_total_count >= 1000, - "total object count should be at least 1000, got {}", - usage.objects_total_count - ); - assert!( - bucket_usage.objects_count >= 1000, - "bucket object count should be at least 1000, got {}", - bucket_usage.objects_count - ); + assert_eq!(usage.objects_total_count, 1000, "total object count should be exact"); + assert_eq!(bucket_usage.objects_count, 1000, "bucket object count should be exact"); env.stop_server(); Ok(()) @@ -116,7 +107,6 @@ async fn data_usage_reports_all_objects() -> Result<(), Box Result<(), Box> { init_logging(); diff --git a/docs/testing/e2e-suite-inventory.md b/docs/testing/e2e-suite-inventory.md index 4a7a80b85..502b07e60 100644 --- a/docs/testing/e2e-suite-inventory.md +++ b/docs/testing/e2e-suite-inventory.md @@ -41,6 +41,7 @@ | copy_object_version_restore_test | 2 | | | copy_source_invalid_date_test | 1 | ✅ | | create_bucket_region_test | 2 | ✅ | +| data_usage_test | 2 | | | degraded_read_eof_regression_test | 3 | | | delete_marker_migration_semantics_test | 2 | ✅ | | delete_object_no_content_length_test | 1 | |