Skip to content

Commit 4eb842c

Browse files
committed
adjust to changes in git-testtools
1 parent dbf6c8c commit 4eb842c

File tree

40 files changed

+73
-76
lines changed

40 files changed

+73
-76
lines changed

git-attributes/tests/match_group/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mod ignore {
3232

3333
#[test]
3434
fn from_git_dir() -> crate::Result {
35-
let dir = git_testtools::scripted_fixture_repo_read_only("make_global_and_external_and_dir_ignores.sh")?;
35+
let dir = git_testtools::scripted_fixture_read_only("make_global_and_external_and_dir_ignores.sh")?;
3636
let repo_dir = dir.join("repo");
3737
let git_dir = repo_dir.join(".git");
3838
let baseline = std::fs::read(git_dir.parent().unwrap().join("git-check-ignore.baseline"))?;

git-commitgraph/tests/commitgraph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ pub fn check_common(cg: &Graph, expected: &HashMap<String, RefInfo, impl BuildHa
6060
);
6161
}
6262

63-
use git_testtools::scripted_fixture_repo_read_only;
63+
use git_testtools::scripted_fixture_read_only;
6464
pub fn make_readonly_repo(script_path: &str) -> std::path::PathBuf {
65-
scripted_fixture_repo_read_only(script_path).expect("script succeeds all the time")
65+
scripted_fixture_read_only(script_path).expect("script succeeds all the time")
6666
}
6767

6868
pub fn hex_to_id(hex: &[u8]) -> git_hash::ObjectId {

git-config/tests/file/init/comfort.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn from_environment_overrides() {
2121
#[test]
2222
#[serial]
2323
fn from_git_dir() -> crate::Result {
24-
let worktree_dir = git_testtools::scripted_fixture_repo_read_only("make_config_repo.sh")?;
24+
let worktree_dir = git_testtools::scripted_fixture_read_only("make_config_repo.sh")?;
2525
let git_dir = worktree_dir.join(".git");
2626
let worktree_dir = worktree_dir.canonicalize()?;
2727
let _env = Env::new()
@@ -84,7 +84,7 @@ fn from_git_dir() -> crate::Result {
8484
#[test]
8585
#[serial]
8686
fn from_git_dir_with_worktree_extension() -> crate::Result {
87-
let git_dir = git_testtools::scripted_fixture_repo_read_only("config_with_worktree_extension.sh")?
87+
let git_dir = git_testtools::scripted_fixture_read_only("config_with_worktree_extension.sh")?
8888
.join("main-worktree")
8989
.join(".git");
9090
let config = git_config::File::from_git_dir(git_dir)?;

git-date/tests/time/baseline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Sample {
1313

1414
static BASELINE: Lazy<HashMap<String, Sample>> = Lazy::new(|| {
1515
(|| -> Result<_> {
16-
let base = git_testtools::scripted_fixture_repo_read_only("generate_git_date_baseline.sh")?;
16+
let base = git_testtools::scripted_fixture_read_only("generate_git_date_baseline.sh")?;
1717
let mut map = HashMap::new();
1818
let file = std::fs::read(base.join("baseline.git"))?;
1919
let baseline = std::str::from_utf8(&file).expect("valid utf");

git-diff/tests/tree/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mod changes {
1111

1212
fn db(args: impl IntoIterator<Item = &'static str>) -> crate::Result<git_odb::Handle> {
1313
git_odb::at(
14-
git_testtools::scripted_fixture_repo_read_only_with_args("make_diff_repo.sh", args)?
14+
git_testtools::scripted_fixture_read_only_with_args("make_diff_repo.sh", args)?
1515
.join(".git")
1616
.join("objects"),
1717
)

git-discover/tests/is_git/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn verify_on_exfat() -> crate::Result<()> {
77

88
use git_discover::repository::Kind;
99

10-
let fixtures = git_testtools::scripted_fixture_repo_read_only("make_exfat_repo_darwin.sh")?;
10+
let fixtures = git_testtools::scripted_fixture_read_only("make_exfat_repo_darwin.sh")?;
1111
let mount_point = tempfile::tempdir()?;
1212

1313
let _cleanup = {

git-discover/tests/isolated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use serial_test::serial;
66
#[test]
77
#[serial]
88
fn upwards_with_relative_directories_and_optional_ceiling() -> git_testtools::Result {
9-
let repo = git_testtools::scripted_fixture_repo_read_only("make_basic_repo.sh")?;
9+
let repo = git_testtools::scripted_fixture_read_only("make_basic_repo.sh")?;
1010

1111
std::env::set_current_dir(repo.join("subdir"))?;
1212
let cwd = std::env::current_dir()?;

git-discover/tests/upwards/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ fn cross_fs() -> crate::Result {
226226
return Ok(());
227227
}
228228

229-
let top_level_repo = git_testtools::scripted_fixture_repo_writable("make_basic_repo.sh")?;
229+
let top_level_repo = git_testtools::scripted_fixture_writable("make_basic_repo.sh")?;
230230

231231
let _cleanup = {
232232
// Create an empty dmg file
@@ -307,7 +307,7 @@ fn do_not_shorten_absolute_paths() -> crate::Result {
307307
mod submodules {
308308
#[test]
309309
fn by_their_worktree_checkout() -> crate::Result {
310-
let dir = git_testtools::scripted_fixture_repo_read_only("make_submodules.sh")?;
310+
let dir = git_testtools::scripted_fixture_read_only("make_submodules.sh")?;
311311
let parent = dir.join("with-submodules");
312312
let modules = parent.join(".git").join("modules");
313313
for module in ["m1", "dir/m1"] {
@@ -336,7 +336,7 @@ mod submodules {
336336

337337
#[test]
338338
fn by_their_module_git_dir() -> crate::Result {
339-
let dir = git_testtools::scripted_fixture_repo_read_only("make_submodules.sh")?;
339+
let dir = git_testtools::scripted_fixture_read_only("make_submodules.sh")?;
340340
let modules = dir.join("with-submodules").join(".git").join("modules");
341341
for module in ["m1", "dir/m1"] {
342342
let submodule_m1_gitdir = modules.join(module);
@@ -353,5 +353,5 @@ mod submodules {
353353
}
354354

355355
pub(crate) fn repo_path() -> crate::Result<PathBuf> {
356-
git_testtools::scripted_fixture_repo_read_only("make_basic_repo.sh")
356+
git_testtools::scripted_fixture_read_only("make_basic_repo.sh")
357357
}

git-glob/tests/pattern/matching.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'a> Baseline<'a> {
4343

4444
#[test]
4545
fn compare_baseline_with_ours() {
46-
let dir = git_testtools::scripted_fixture_repo_read_only("make_baseline.sh").unwrap();
46+
let dir = git_testtools::scripted_fixture_read_only("make_baseline.sh").unwrap();
4747
let (mut total_matches, mut total_correct, mut panics) = (0, 0, 0);
4848
let mut mismatches = Vec::new();
4949
for (input_file, expected_matches, case) in &[

git-index/tests/index/init.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use git_index::{verify::extensions::no_find, State};
22
use git_repository as git;
33
use git_repository::prelude::FindExt;
4-
use git_testtools::scripted_fixture_repo_read_only;
4+
use git_testtools::scripted_fixture_read_only;
55

66
#[test]
77
fn from_tree() -> crate::Result {
@@ -13,7 +13,7 @@ fn from_tree() -> crate::Result {
1313
];
1414

1515
for fixture in fixtures {
16-
let repo_dir = scripted_fixture_repo_read_only(fixture)?;
16+
let repo_dir = scripted_fixture_read_only(fixture)?;
1717
let repo = git::open(&repo_dir)?;
1818

1919
let tree_id = repo.head_commit()?.tree_id()?;

0 commit comments

Comments
 (0)