Skip to content

Commit

Permalink
Fix(ci): Move problem tests purely to cargo make test (#250)
Browse files Browse the repository at this point in the history
A few tests are routinely failing on CI because they explicitly
hit YouTube URLs, even if the content in question is CC-licensed.
This PR simply adds the `#[ignore]` attribute, and adds the
`--include-ignored` flag to `cargo make test` so that correct WebM
parsing behaviour can be locally verified.

We could go a bit further and conditionally ignore the tests based
on CI-specific ENV vars, but that's probably overkill given the
scope of the issue.
  • Loading branch information
FelixMcFelix authored Aug 24, 2024
1 parent 530286c commit 0844537
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ args = ["clippy", "--features", "full-doc", "--", "-D", "warnings"]
dependencies = ["format"]

[tasks.test]
args = ["test", "--features", "full-doc"]
args = ["test", "--features", "full-doc", "--", "--include-ignored"]

[tasks.test-simd]
args = ["test", "--features", "full-doc,simd-json,serenity?/simd_json,twilight-gateway?/simd-json"]
Expand Down
3 changes: 3 additions & 0 deletions src/input/sources/ytdl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ mod tests {
}

#[tokio::test]
#[ignore]
#[ntest::timeout(20_000)]
async fn ytdl_page_with_playlist_plays() {
track_plays_passthrough(|| YoutubeDl::new(Client::new(), YTDL_PLAYLIST_TARGET.into()))
Expand Down Expand Up @@ -274,6 +275,7 @@ mod tests {
}

#[tokio::test]
#[ignore]
#[ntest::timeout(20_000)]
async fn ytdl_search_plays() {
let mut ytdl = YoutubeDl::new_search(Client::new(), "cloudkicker 94 days".into());
Expand All @@ -286,6 +288,7 @@ mod tests {
}

#[tokio::test]
#[ignore]
#[ntest::timeout(20_000)]
async fn ytdl_search_3() {
let mut ytdl = YoutubeDl::new_search(Client::new(), "test".into());
Expand Down

0 comments on commit 0844537

Please sign in to comment.