From b4d6d76a4cca4c706978ef40ae85ff55e52ecfe0 Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Sat, 24 Aug 2024 23:04:10 +0100 Subject: [PATCH] Fix(ci): Move problem tests purely to `cargo make test` 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. --- Makefile.toml | 2 +- src/input/sources/ytdl.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.toml b/Makefile.toml index 590aad63e..fec3d4565 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -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"] diff --git a/src/input/sources/ytdl.rs b/src/input/sources/ytdl.rs index 97015505a..c3f69a818 100644 --- a/src/input/sources/ytdl.rs +++ b/src/input/sources/ytdl.rs @@ -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())) @@ -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()); @@ -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());