Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a .git directory in the test context root #11761

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/uv/tests/it/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ impl TestContext {

let root = tempfile::TempDir::new_in(bucket).expect("Failed to create test root directory");

// Create a `.git` directory to isolate tests that search for git boundaries from the state
// of the file system
fs_err::create_dir_all(root.path().join(".git"))
.expect("Failed to create `.git` placeholder in test root directory");

let temp_dir = ChildPath::new(root.path()).child("temp");
fs_err::create_dir_all(&temp_dir).expect("Failed to create test working directory");

Expand Down
Loading