From: Manuel Traut Date: Wed, 20 Nov 2024 19:19:03 +0100 Subject: Disable tests that require network --- podcasts-data/src/dbqueries.rs | 2 ++ podcasts-data/src/models/source.rs | 3 +++ podcasts-data/src/pipeline.rs | 3 +++ podcasts-gtk/src/utils.rs | 3 +++ 4 files changed, 11 insertions(+) diff --git a/podcasts-data/src/dbqueries.rs b/podcasts-data/src/dbqueries.rs index 70dede9..a05e0bc 100644 --- a/podcasts-data/src/dbqueries.rs +++ b/podcasts-data/src/dbqueries.rs @@ -548,6 +548,7 @@ mod tests { use crate::utils::get_feed; use anyhow::Result; + /* Disable tests that need network connection #[test] fn test_update_none_to_played_now() -> Result<()> { truncate_db()?; @@ -568,6 +569,7 @@ mod tests { assert_eq!(eps_num2, 0); Ok(()) } + */ #[test] fn test_episode_exists() -> Result<()> { diff --git a/podcasts-data/src/models/source.rs b/podcasts-data/src/models/source.rs index 2d1d20c..09c3a9c 100644 --- a/podcasts-data/src/models/source.rs +++ b/podcasts-data/src/models/source.rs @@ -318,6 +318,8 @@ mod tests { use crate::downloader::client_builder; use crate::utils::get_feed; + /* Disable tests that need a network connection + #[test] fn test_into_feed() -> Result<()> { truncate_db()?; @@ -363,4 +365,5 @@ mod tests { ); Ok(()) } + */ } diff --git a/podcasts-data/src/pipeline.rs b/podcasts-data/src/pipeline.rs index 09b33e2..2993004 100644 --- a/podcasts-data/src/pipeline.rs +++ b/podcasts-data/src/pipeline.rs @@ -79,6 +79,8 @@ mod tests { com/feed/podcast", ]; + /* Disable tests that need a network connectioa + #[test] /// Insert feeds and update/index them. fn test_pipeline() -> Result<(), DataError> { @@ -107,4 +109,5 @@ mod tests { assert_eq!(dbqueries::get_episodes()?.len(), 354); Ok(()) } + */ } diff --git a/podcasts-gtk/src/utils.rs b/podcasts-gtk/src/utils.rs index 95c2e9b..69b2d2d 100644 --- a/podcasts-gtk/src/utils.rs +++ b/podcasts-gtk/src/utils.rs @@ -468,6 +468,8 @@ pub(crate) async fn on_export_clicked(window: >k::ApplicationWindow, sender: & }; } +/* Disable tests that need a network connection + #[cfg(test)] mod tests { use super::*; @@ -645,3 +647,4 @@ mod tests { Ok(()) } } +*/