test(e2e): activate data usage regressions (#6429)

* test(e2e): activate data usage regressions

* test(e2e): bind data usage selection to Linux listing

* test(e2e): refresh data usage Darwin selection

---------

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
Zhengchao An
2026-08-24 14:14:02 +08:00
committed by GitHub
parent a66b568ba0
commit af6545b689
2 changed files with 5 additions and 14 deletions
+4 -14
View File
@@ -59,7 +59,6 @@ where
/// Regression test for data usage accuracy (issue #1012). /// Regression test for data usage accuracy (issue #1012).
/// Launches rustfs, writes 1000 objects, then asserts admin data usage reports the full count. /// Launches rustfs, writes 1000 objects, then asserts admin data usage reports the full count.
#[tokio::test(flavor = "multi_thread")] #[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<dyn std::error::Error + Send + Sync>> { async fn data_usage_reports_all_objects() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
init_logging(); init_logging();
@@ -86,28 +85,20 @@ async fn data_usage_reports_all_objects() -> Result<(), Box<dyn std::error::Erro
usage usage
.buckets_usage .buckets_usage
.get(TEST_BUCKET) .get(TEST_BUCKET)
.map(|bucket_usage| usage.objects_total_count >= 1000 && bucket_usage.objects_count >= 1000) .map(|bucket_usage| usage.objects_total_count == 1000 && bucket_usage.objects_count == 1000)
.unwrap_or(false) .unwrap_or(false)
}) })
.await?; .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 let bucket_usage = usage
.buckets_usage .buckets_usage
.get(TEST_BUCKET) .get(TEST_BUCKET)
.cloned() .cloned()
.expect("bucket usage should exist"); .expect("bucket usage should exist");
assert!( assert_eq!(usage.objects_total_count, 1000, "total object count should be exact");
usage.objects_total_count >= 1000, assert_eq!(bucket_usage.objects_count, 1000, "bucket object count should be exact");
"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
);
env.stop_server(); env.stop_server();
Ok(()) Ok(())
@@ -116,7 +107,6 @@ async fn data_usage_reports_all_objects() -> Result<(), Box<dyn std::error::Erro
/// Regression test for issue #3898. /// Regression test for issue #3898.
/// Versioned buckets should expose versions and delete markers through admin data usage. /// Versioned buckets should expose versions and delete markers through admin data usage.
#[tokio::test(flavor = "multi_thread")] #[tokio::test(flavor = "multi_thread")]
#[ignore = "Starts a rustfs server and requires awscurl; enable when running full E2E"]
async fn data_usage_reports_versioned_objects_and_delete_markers() -> Result<(), Box<dyn std::error::Error + Send + Sync>> { async fn data_usage_reports_versioned_objects_and_delete_markers() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
init_logging(); init_logging();
+1
View File
@@ -41,6 +41,7 @@
| copy_object_version_restore_test | 2 | | | copy_object_version_restore_test | 2 | |
| copy_source_invalid_date_test | 1 | ✅ | | copy_source_invalid_date_test | 1 | ✅ |
| create_bucket_region_test | 2 | ✅ | | create_bucket_region_test | 2 | ✅ |
| data_usage_test | 2 | |
| degraded_read_eof_regression_test | 3 | | | degraded_read_eof_regression_test | 3 | |
| delete_marker_migration_semantics_test | 2 | ✅ | | delete_marker_migration_semantics_test | 2 | ✅ |
| delete_object_no_content_length_test | 1 | | | delete_object_no_content_length_test | 1 | |