refactor: centralize external ECStore facade aliases (#3746)

This commit is contained in:
Zhengchao An
2026-06-22 20:37:13 +08:00
committed by GitHub
parent 89805ffb4d
commit 88a87b3e8f
16 changed files with 222 additions and 118 deletions
+5 -7
View File
@@ -1,9 +1,7 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use rustfs_ecstore::api::bucket::utils::{
check_bucket_and_object_names, check_list_objs_args, check_valid_bucket_name_strict, is_meta_bucketname,
};
use rustfs_ecstore::api::bucket as ecstore_bucket;
fn parse_case(data: &[u8]) -> (String, String) {
let text = String::from_utf8_lossy(data);
@@ -24,10 +22,10 @@ fn looks_like_ipv4(text: &str) -> bool {
fuzz_target!(|data: &[u8]| {
let (bucket, object) = parse_case(data);
let strict_bucket_ok = check_valid_bucket_name_strict(&bucket).is_ok();
let valid_bucket_for_object_ops = strict_bucket_ok || is_meta_bucketname(&bucket);
let pair_ok = check_bucket_and_object_names(&bucket, &object).is_ok();
let list_ok = check_list_objs_args(&bucket, &object, &None).is_ok();
let strict_bucket_ok = ecstore_bucket::utils::check_valid_bucket_name_strict(&bucket).is_ok();
let valid_bucket_for_object_ops = strict_bucket_ok || ecstore_bucket::utils::is_meta_bucketname(&bucket);
let pair_ok = ecstore_bucket::utils::check_bucket_and_object_names(&bucket, &object).is_ok();
let list_ok = ecstore_bucket::utils::check_list_objs_args(&bucket, &object, &None).is_ok();
if strict_bucket_ok {
let trimmed = bucket.trim();