Skip to content

Commit c2d134e

Browse files
committed
test: re-enable slow tests
Some doc tests were slow becuase they required to compile the main library. The code used from the main library was moved to workspace pacakages and there is no dependency with the main tracker lib. See #1097
1 parent a7ceb0f commit c2d134e

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

packages/http-protocol/src/v1/query.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ impl Query {
3030
/// It return `Some(value)` for a URL query param if the param with the
3131
/// input `name` exists. For example:
3232
///
33-
/// ```text
34-
/// use torrust_tracker_lib::servers::http::v1::query::Query;
33+
/// ```rust
34+
/// use bittorrent_http_protocol::v1::query::Query;
3535
///
3636
/// let raw_query = "param1=value1&param2=value2";
3737
///
@@ -43,8 +43,8 @@ impl Query {
4343
///
4444
/// It returns only the first param value even if it has multiple values:
4545
///
46-
/// ```text
47-
/// use torrust_tracker_lib::servers::http::v1::query::Query;
46+
/// ```rust
47+
/// use bittorrent_http_protocol::v1::query::Query;
4848
///
4949
/// let raw_query = "param1=value1&param1=value2";
5050
///
@@ -59,8 +59,8 @@ impl Query {
5959

6060
/// Returns all the param values as a vector.
6161
///
62-
/// ```text
63-
/// use torrust_tracker_lib::servers::http::v1::query::Query;
62+
/// ```rust
63+
/// use bittorrent_http_protocol::v1::query::Query;
6464
///
6565
/// let query = "param1=value1&param1=value2".parse::<Query>().unwrap();
6666
///
@@ -72,8 +72,8 @@ impl Query {
7272
///
7373
/// Returns all the param values as a vector even if it has only one value.
7474
///
75-
/// ```text
76-
/// use torrust_tracker_lib::servers::http::v1::query::Query;
75+
/// ```rust
76+
/// use bittorrent_http_protocol::v1::query::Query;
7777
///
7878
/// let query = "param1=value1".parse::<Query>().unwrap();
7979
///

packages/http-protocol/src/v1/requests/announce.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const NUMWANT: &str = "numwant";
2929
/// The `Announce` request. Fields use the domain types after parsing the
3030
/// query params of the request.
3131
///
32-
/// ```text
32+
/// ```rust
3333
/// use aquatic_udp_protocol::{NumberOfBytes, PeerId};
34-
/// use torrust_tracker_lib::servers::http::v1::requests::announce::{Announce, Compact, Event};
34+
/// use bittorrent_http_protocol::v1::requests::announce::{Announce, Compact, Event};
3535
/// use bittorrent_primitives::info_hash::InfoHash;
3636
///
3737
/// let request = Announce {

packages/http-protocol/src/v1/responses/announce.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ impl Into<Vec<u8>> for Compact {
130130

131131
/// A [`NormalPeer`], for the [`Normal`] form.
132132
///
133-
/// ```text
133+
/// ```rust
134134
/// use std::net::{IpAddr, Ipv4Addr};
135-
/// use torrust_tracker_lib::servers::http::v1::responses::announce::{Normal, NormalPeer};
135+
/// use bittorrent_http_protocol::v1::responses::announce::{Normal, NormalPeer};
136136
///
137137
/// let peer = NormalPeer {
138138
/// peer_id: *b"-qB00000000000000001",
@@ -182,9 +182,9 @@ impl From<&NormalPeer> for BencodeMut<'_> {
182182
/// A part from reducing the size of the response, this format does not contain
183183
/// the peer's ID.
184184
///
185-
/// ```text
185+
/// ```rust
186186
/// use std::net::{IpAddr, Ipv4Addr};
187-
/// use torrust_tracker_lib::servers::http::v1::responses::announce::{Compact, CompactPeer, CompactPeerData};
187+
/// use bittorrent_http_protocol::v1::responses::announce::{Compact, CompactPeer, CompactPeerData};
188188
///
189189
/// let peer = CompactPeer::V4(CompactPeerData {
190190
/// ip: Ipv4Addr::new(0x69, 0x69, 0x69, 0x69), // 105.105.105.105

packages/http-protocol/src/v1/responses/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pub struct Error {
2626
impl Error {
2727
/// Returns the bencoded representation of the `Error` struct.
2828
///
29-
/// ```text
30-
/// use torrust_tracker_lib::servers::http::v1::responses::error::Error;
29+
/// ```rust
30+
/// use bittorrent_http_protocol::v1::responses::error::Error;
3131
///
3232
/// let err = Error {
3333
/// failure_reason: "error message".to_owned(),

packages/http-protocol/src/v1/responses/scrape.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ use torrust_tracker_primitives::core::ScrapeData;
88

99
/// The `Scrape` response for the HTTP tracker.
1010
///
11-
/// ```text
12-
/// use torrust_tracker_lib::servers::http::v1::responses::scrape::Bencoded;
11+
/// ```rust
12+
/// use bittorrent_http_protocol::v1::responses::scrape::Bencoded;
1313
/// use bittorrent_primitives::info_hash::InfoHash;
1414
/// use torrust_tracker_primitives::swarm_metadata::SwarmMetadata;
15-
/// use torrust_tracker_lib::core::ScrapeData;
15+
/// use torrust_tracker_primitives::core::ScrapeData;
1616
///
1717
/// let info_hash = InfoHash::from_bytes(&[0x69; 20]);
1818
/// let mut scrape_data = ScrapeData::empty();

packages/http-protocol/src/v1/services/peer_ip_resolver.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ pub enum PeerIpResolutionError {
5959
///
6060
/// With the tracker running on reverse proxy mode:
6161
///
62-
/// ```text
62+
/// ```rust
6363
/// use std::net::IpAddr;
6464
/// use std::str::FromStr;
6565
///
66-
/// use torrust_tracker_lib::servers::http::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
66+
/// use bittorrent_http_protocol::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
6767
///
6868
/// let on_reverse_proxy = true;
6969
///
@@ -81,11 +81,11 @@ pub enum PeerIpResolutionError {
8181
///
8282
/// With the tracker non running on reverse proxy mode:
8383
///
84-
/// ```text
84+
/// ```rust
8585
/// use std::net::IpAddr;
8686
/// use std::str::FromStr;
8787
///
88-
/// use torrust_tracker_lib::servers::http::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
88+
/// use bittorrent_http_protocol::v1::services::peer_ip_resolver::{invoke, ClientIpSources, PeerIpResolutionError};
8989
///
9090
/// let on_reverse_proxy = false;
9191
///

0 commit comments

Comments
 (0)