mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-07 05:43:14 +00:00
10db415099
`read_version_quorum_test_set` (#5365) writes `valid_test_fileinfo` to disk before exercising the optimized version read. That fixture deliberately carries a positive size with no parts so it can drive `get_object_with_fileinfo_rejects_positive_size_without_parts`, and #5354 subsequently taught `validate_collection_contents` to reject exactly that shape as `FileCorrupt`. #5354 fixed up the fixtures that existed when it landed, but #5365 was developed in parallel and its new fixture was not, so `write_metadata` now fails in the helper and both `read_version_optimized_counts_only_valid_metadata_toward_quorum` and `read_version_optimized_uses_current_set_drive_quorum_not_pool_set_count` panic on `metadata should be written before quorum read: FileCorrupt`. Neither PR could see the break on its own; it only appears once both are on main, where it fails the Test and Lint lane deterministically for every PR. Push a part matching the fixture's size in the helper — the same fix #5354 applied to its own on-disk fixture in `disk/local.rs` — instead of changing `valid_test_fileinfo`, which must stay part-less for the rejection test. Verification: - cargo test -p rustfs-ecstore --lib set_disk::read::metadata_cache_tests (previously 2 failed, now 33 passed / 0 failed) - cargo fmt --all --check and cargo clippy -p rustfs-ecstore --lib --tests clean