Test UDP tracker URLs parse
Also change UDP tracker protocol extensions from unsupported to N/A. type: testing
This commit is contained in:
parent
0560181a09
commit
a8446c82db
|
@ -81,7 +81,7 @@ at any time.
|
||||||
| [38](http://bittorrent.org/beps/bep_0038.html) | :heavy_minus_sign: | Finding Local Data Via Torrent File Hints |
|
| [38](http://bittorrent.org/beps/bep_0038.html) | :heavy_minus_sign: | Finding Local Data Via Torrent File Hints |
|
||||||
| [39](http://bittorrent.org/beps/bep_0039.html) | [:x:](https://github.com/casey/intermodal/issues/98) | Updating Torrents Via Feed URL |
|
| [39](http://bittorrent.org/beps/bep_0039.html) | [:x:](https://github.com/casey/intermodal/issues/98) | Updating Torrents Via Feed URL |
|
||||||
| [40](http://bittorrent.org/beps/bep_0040.html) | :heavy_minus_sign: | Canonical Peer Priority |
|
| [40](http://bittorrent.org/beps/bep_0040.html) | :heavy_minus_sign: | Canonical Peer Priority |
|
||||||
| [41](http://bittorrent.org/beps/bep_0041.html) | [:x:](https://github.com/casey/intermodal/issues/97) | UDP Tracker Protocol Extensions |
|
| [41](http://bittorrent.org/beps/bep_0041.html) | :heavy_minus_sign: | UDP Tracker Protocol Extensions |
|
||||||
| [42](http://bittorrent.org/beps/bep_0042.html) | :heavy_minus_sign: | DHT Security extension |
|
| [42](http://bittorrent.org/beps/bep_0042.html) | :heavy_minus_sign: | DHT Security extension |
|
||||||
| [43](http://bittorrent.org/beps/bep_0043.html) | :heavy_minus_sign: | Read-only DHT Nodes |
|
| [43](http://bittorrent.org/beps/bep_0043.html) | :heavy_minus_sign: | Read-only DHT Nodes |
|
||||||
| [44](http://bittorrent.org/beps/bep_0044.html) | :heavy_minus_sign: | Storing arbitrary data in the DHT |
|
| [44](http://bittorrent.org/beps/bep_0044.html) | :heavy_minus_sign: | Storing arbitrary data in the DHT |
|
||||||
|
|
|
@ -256,6 +256,26 @@ mod tests {
|
||||||
assert!(metainfo.announce_list.is_none());
|
assert!(metainfo.announce_list.is_none());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn announce_udp() {
|
||||||
|
let mut env = environment(&[
|
||||||
|
"--input",
|
||||||
|
"foo",
|
||||||
|
"--announce",
|
||||||
|
"udp://tracker.opentrackr.org:1337/announce",
|
||||||
|
]);
|
||||||
|
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,
|
||||||
|
"udp://tracker.opentrackr.org:1337/announce"
|
||||||
|
);
|
||||||
|
assert!(metainfo.announce_list.is_none());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn announce_single_tier() {
|
fn announce_single_tier() {
|
||||||
let mut env = environment(&[
|
let mut env = environment(&[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user