Test that wss://
trackers are accepted
type: testing
This commit is contained in:
parent
a6745e2a41
commit
6461a00ba3
|
@ -287,6 +287,18 @@ mod tests {
|
|||
assert!(metainfo.announce_list.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn announce_wss_tracker() {
|
||||
let mut env = environment(&["--input", "foo", "--announce", "wss://tracker.btorrent.xyz"]);
|
||||
fs::write(env.resolve("foo"), "").unwrap();
|
||||
env.run().unwrap();
|
||||
let torrent = env.resolve("foo.torrent");
|
||||
let bytes = fs::read(torrent).unwrap();
|
||||
let metainfo = serde_bencode::de::from_bytes::<Metainfo>(&bytes).unwrap();
|
||||
assert_eq!(metainfo.announce, "wss://tracker.btorrent.xyz/");
|
||||
assert!(metainfo.announce_list.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn announce_single_tier() {
|
||||
let mut env = environment(&[
|
||||
|
|
Loading…
Reference in New Issue
Block a user