sourcefrog / conserve

🌲 Robust file backup tool in Rust
Other
260 stars 21 forks source link

Fix test gaps found by cargo-mutants #241

Closed sourcefrog closed 1 month ago

sourcefrog commented 9 months ago

See https://github.com/sourcefrog/conserve/actions/runs/7307490889/job/19913239409 etc

sourcefrog commented 7 months ago

Currently missed mutants in 77aa9f5, subject to current filters

MISSED   src/backup.rs:218:41: replace += with -= in BackupWriter::copy_entry in 5.9s build + 2.7s test
MISSED   src/backup.rs:218:41: replace += with *= in BackupWriter::copy_entry in 5.2s build + 2.7s test
MISSED   src/backup.rs:268:47: replace += with *= in BackupWriter::copy_file in 5.3s build + 2.7s test
test     src/backup.rs:346:5: replace store_file_content -> Result<Vec<Address>> with Ok(vec![]) ... 0.3
MISSED   src/backup.rs:373:31: replace += with -= in store_file_content in 5.8s build + 2.7s test
MISSED   src/backup.rs:373:31: replace += with *= in store_file_content in 5.3s build + 2.7s test
MISSED   src/backup.rs:381:37: replace += with *= in store_file_content in 5.3s build + 2.7s test
MISSED   src/backup.rs:486:36: replace += with -= in FileCombiner::push_file in 5.7s build + 2.7s test
MISSED   src/backup.rs:486:36: replace += with *= in FileCombiner::push_file in 5.5s build + 2.7s test
MISSED   src/backup.rs:500:36: replace += with -= in FileCombiner::push_file in 5.4s build + 2.7s test
MISSED   src/backup.rs:500:36: replace += with *= in FileCombiner::push_file in 5.2s build + 2.7s test
TIMEOUT  src/bandid.rs:56:32: replace - with + in BandId::previous in 5.2s build + 20.0s test
TIMEOUT  src/bandid.rs:56:32: replace - with / in BandId::previous in 5.1s build + 20.0s test
MISSED   src/transport.rs:89:9: replace Transport::is_file -> Result<bool> with Ok(true) in 6.6s build + 3.7s test
MISSED   src/transport.rs:89:9: replace Transport::is_file -> Result<bool> with Ok(false) in 6.5s build + 2.7s test
MISSED   src/transport.rs:90:46: replace == with != in Transport::is_file in 5.9s build + 2.7s test
MISSED   src/transport.rs:91:36: replace == with != in Transport::is_file in 5.5s build + 2.7s test
247 mutants tested in 22m 55s: 14 missed, 173 caught, 58 unviable, 2 timeouts

Mostly due to newly-added patterns but perhaps also that Transport method is obsolete/unused?