feat(storage-api): bind ecstore admin contract (#3331)

This commit is contained in:
安正超
2026-06-11 05:49:14 +08:00
committed by GitHub
parent 474fab5097
commit 4b1714438e
3 changed files with 98 additions and 28 deletions
@@ -15,8 +15,9 @@
use rustfs_ecstore::store_api::{
BucketInfo as EcstoreBucketInfo, BucketOptions as EcstoreBucketOptions, MakeBucketOptions as EcstoreMakeBucketOptions,
};
use rustfs_ecstore::{disk::DiskStore, error::Error, store::ECStore};
use rustfs_storage_api::{
BucketInfo as ApiBucketInfo, BucketOptions as ApiBucketOptions, MakeBucketOptions as ApiMakeBucketOptions,
BucketInfo as ApiBucketInfo, BucketOptions as ApiBucketOptions, MakeBucketOptions as ApiMakeBucketOptions, StorageAdminApi,
};
#[test]
@@ -36,3 +37,20 @@ fn old_store_api_bucket_dto_path_reexports_storage_api_types() {
assert!(!ecstore_make.lock_enabled);
assert!(!api_options.no_metadata);
}
fn storage_admin_api_type_name<T>() -> &'static str
where
T: StorageAdminApi<
BackendInfo = rustfs_madmin::BackendInfo,
StorageInfo = rustfs_madmin::StorageInfo,
Disk = DiskStore,
Error = Error,
>,
{
std::any::type_name::<T>()
}
#[test]
fn ecstore_implements_storage_admin_api_contract() {
assert!(storage_admin_api_type_name::<ECStore>().ends_with("::ECStore"));
}