End-to-end unit test (#90)

* First implementation of create_torrent_file

* Test harness for e2e preparing

* Saving

* Continuing test harness

* Continuing test harness

* Continuing test harness

* All servers are running

* Full e2e harness done

* Test e2e harness working fine

* Remove lints

* injecting faults

* The e2e test runs continuously

* e2e test

* Add a test for create_torrent

* Nothing

* Nothing, just tweaking the numberes

* Update tokio, remove custom tempfile shim
This commit is contained in:
Igor Katson 2024-03-05 09:18:22 +00:00 committed by GitHub
parent 5d6ecb8065
commit 2778d46bb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 634 additions and 20 deletions

View file

@ -41,7 +41,7 @@ fn compute_chunk_status(lengths: &Lengths, needed_pieces: &BF) -> BF {
.unwrap()
.iter_zeros()
{
let offset = piece_index * lengths.default_chunks_per_piece() as usize;
let offset = piece_index * lengths.default_max_chunks_per_piece() as usize;
let chunks_per_piece = lengths
.chunks_per_piece(lengths.validate_piece_index(piece_index as u32).unwrap())
as usize;