From c4f517acb5724c828f30b9bf5a4da81950550ceb Mon Sep 17 00:00:00 2001 From: extrawurst Date: Thu, 17 Oct 2024 11:28:40 +0200 Subject: [PATCH] Revert "Add test for AsyncLog respecting GIT_DIR (#2387)" This reverts commit 9c433b4de3939acae185b09f5d754e778dd8b4a6. --- asyncgit/src/revlog.rs | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/asyncgit/src/revlog.rs b/asyncgit/src/revlog.rs index af18432385..0a2a2d3680 100644 --- a/asyncgit/src/revlog.rs +++ b/asyncgit/src/revlog.rs @@ -331,8 +331,6 @@ mod tests { use std::time::Duration; use crossbeam_channel::unbounded; - use serial_test::serial; - use tempfile::TempDir; use crate::sync::tests::{debug_cmd_print, repo_init}; use crate::sync::RepoPath; @@ -370,37 +368,4 @@ mod tests { assert!(result.is_ok()); } - - #[test] - #[serial] - fn test_env_variables() { - let (_td, repo) = repo_init().unwrap(); - let git_dir = repo.path(); - - let (tx_git, _rx_git) = unbounded(); - - let empty_dir = TempDir::new().unwrap(); - let empty_path: RepoPath = - empty_dir.path().to_str().unwrap().into(); - - let arc_current = Arc::new(Mutex::new(AsyncLogResult { - commits: Vec::new(), - duration: Duration::default(), - })); - let arc_background = Arc::new(AtomicBool::new(false)); - - std::env::set_var("GIT_DIR", git_dir); - - let result = AsyncLog::fetch_helper_without_filter( - // We pass an empty path, thus testing whether `GIT_DIR`, set above, is taken into account. - &empty_path, - &arc_current, - &arc_background, - &tx_git, - ); - - std::env::remove_var("GIT_DIR"); - - assert!(result.is_ok()); - } }