Fix a broken terst
This commit is contained in:
parent
c6d3a972c4
commit
5c90e0cdd9
3 changed files with 6 additions and 4 deletions
|
|
@ -125,7 +125,8 @@ By default it listens on http://127.0.0.1:3030.
|
|||
"POST /torrents/{index}/delete": "Forget about the torrent, remove the files",
|
||||
"POST /torrents/{index}/forget": "Forget about the torrent, keep the files",
|
||||
"POST /torrents/{index}/pause": "Pause torrent",
|
||||
"POST /torrents/{index}/start": "Resume torrent"
|
||||
"POST /torrents/{index}/start": "Resume torrent",
|
||||
"POST /torrents/{index}/update_only_files": "Change the selection of files to download. You need to POST json of the following form {"only_files": [0, 1, 2]}"
|
||||
},
|
||||
"server": "rqbit"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -493,10 +493,10 @@ mod tests {
|
|||
|
||||
let bf_len = l.piece_bitfield_bytes();
|
||||
let initial_have = BF::from_boxed_slice(vec![0u8; bf_len].into_boxed_slice());
|
||||
let initial_needed = BF::from_boxed_slice(vec![u8::MAX; bf_len].into_boxed_slice());
|
||||
let initial_selected = BF::from_boxed_slice(vec![u8::MAX; bf_len].into_boxed_slice());
|
||||
|
||||
// Initially, we need all files and all pieces.
|
||||
let mut ct = ChunkTracker::new(initial_needed.clone(), initial_have.clone(), l).unwrap();
|
||||
let mut ct = ChunkTracker::new(initial_have.clone(), initial_selected.clone(), l).unwrap();
|
||||
|
||||
// Select all file, no changes.
|
||||
assert_eq!(
|
||||
|
|
@ -509,7 +509,7 @@ mod tests {
|
|||
}
|
||||
);
|
||||
assert_eq!(ct.have, initial_have);
|
||||
assert_eq!(ct.queue_pieces, initial_needed);
|
||||
assert_eq!(ct.queue_pieces, initial_selected);
|
||||
|
||||
// Select only the first file.
|
||||
println!("Select only the first file.");
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ impl HttpApi {
|
|||
"POST /torrents/{index}/start": "Resume torrent",
|
||||
"POST /torrents/{index}/forget": "Forget about the torrent, keep the files",
|
||||
"POST /torrents/{index}/delete": "Forget about the torrent, remove the files",
|
||||
"POST /torrents/{index}/update_only_files": "Change the selection of files to download. You need to POST json of the following form {\"only_files\": [0, 1, 2]}",
|
||||
"POST /torrents": "Add a torrent here. magnet: or http:// or a local file.",
|
||||
"POST /rust_log": "Set RUST_LOG to this post launch (for debugging)",
|
||||
"GET /web/": "Web UI",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue