mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-27 16:48:58 +00:00
test: guard storage contract cleanup (#3501)
This commit is contained in:
@@ -49,6 +49,7 @@ PR_TYPE_HITS_FILE="${TMP_DIR}/pr_type_hits.txt"
|
||||
SOURCE_MARKERS_FILE="${TMP_DIR}/source_markers.txt"
|
||||
SOURCE_IDS_FILE="${TMP_DIR}/source_ids.txt"
|
||||
REGISTER_IDS_FILE="${TMP_DIR}/register_ids.txt"
|
||||
LEGACY_STORAGE_API_HITS_FILE="${TMP_DIR}/legacy_storage_api_hits.txt"
|
||||
|
||||
awk '
|
||||
/^## PR Types$/ {
|
||||
@@ -186,16 +187,25 @@ require_source_line \
|
||||
"pub use error::{StorageErrorCode, StorageResult};" \
|
||||
"storage-api public error contract re-export"
|
||||
|
||||
(
|
||||
cd "$ROOT_DIR"
|
||||
rg -n --no-heading '\bStorageAPI\b' crates/ecstore/src rustfs/src || true
|
||||
) >"$LEGACY_STORAGE_API_HITS_FILE"
|
||||
|
||||
if [[ -s "$LEGACY_STORAGE_API_HITS_FILE" ]]; then
|
||||
report_failure "old StorageAPI facade identifier reintroduced in production source: $(paste -sd '; ' "$LEGACY_STORAGE_API_HITS_FILE")"
|
||||
fi
|
||||
|
||||
require_source_contains \
|
||||
"crates/ecstore/src/store_api/traits.rs" \
|
||||
"pub trait NamespaceLocking: Send + Sync + Debug + 'static" \
|
||||
"separate namespace-locking operation-group trait"
|
||||
require_source_contains \
|
||||
"crates/ecstore/tests/storage_api_compat_test.rs" \
|
||||
"crates/ecstore/tests/ecstore_contract_compat_test.rs" \
|
||||
"fn ecstore_implements_storage_admin_api_contract()" \
|
||||
"ECStore StorageAdminApi compile-time coverage test"
|
||||
require_source_contains \
|
||||
"crates/ecstore/tests/storage_api_compat_test.rs" \
|
||||
"crates/ecstore/tests/ecstore_contract_compat_test.rs" \
|
||||
"fn ecstore_implements_namespace_locking_contract()" \
|
||||
"ECStore NamespaceLocking compile-time coverage test"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user