Files
rustfs/crates
overtrue 10db415099 test(ecstore): give the read-version quorum fixture a valid part
`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
2026-07-29 00:21:27 +08:00
..
2026-07-27 00:22:50 +08:00
2026-07-26 07:10:50 +08:00
2026-07-27 00:22:50 +08:00