Skip to content

Commit c4f517a

Browse files
committed
Revert "Add test for AsyncLog respecting GIT_DIR (#2387)"
This reverts commit 9c433b4.
1 parent 3643e80 commit c4f517a

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

asyncgit/src/revlog.rs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ mod tests {
331331
use std::time::Duration;
332332

333333
use crossbeam_channel::unbounded;
334-
use serial_test::serial;
335-
use tempfile::TempDir;
336334

337335
use crate::sync::tests::{debug_cmd_print, repo_init};
338336
use crate::sync::RepoPath;
@@ -370,37 +368,4 @@ mod tests {
370368

371369
assert!(result.is_ok());
372370
}
373-
374-
#[test]
375-
#[serial]
376-
fn test_env_variables() {
377-
let (_td, repo) = repo_init().unwrap();
378-
let git_dir = repo.path();
379-
380-
let (tx_git, _rx_git) = unbounded();
381-
382-
let empty_dir = TempDir::new().unwrap();
383-
let empty_path: RepoPath =
384-
empty_dir.path().to_str().unwrap().into();
385-
386-
let arc_current = Arc::new(Mutex::new(AsyncLogResult {
387-
commits: Vec::new(),
388-
duration: Duration::default(),
389-
}));
390-
let arc_background = Arc::new(AtomicBool::new(false));
391-
392-
std::env::set_var("GIT_DIR", git_dir);
393-
394-
let result = AsyncLog::fetch_helper_without_filter(
395-
// We pass an empty path, thus testing whether `GIT_DIR`, set above, is taken into account.
396-
&empty_path,
397-
&arc_current,
398-
&arc_background,
399-
&tx_git,
400-
);
401-
402-
std::env::remove_var("GIT_DIR");
403-
404-
assert!(result.is_ok());
405-
}
406371
}

0 commit comments

Comments
 (0)