Skip to content

Commit 2438807

Browse files
committed
test(git): Be consistent on shallow test names
1 parent e0f8cc0 commit 2438807

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

tests/testsuite/git_shallow.rs

+13-18
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ impl RepoMode {
3333
}
3434

3535
#[cargo_test]
36-
fn gitoxide_fetch_shallow_two_revs_same_deps() {
37-
fetch_two_revs_same_deps(Backend::Gitoxide, RepoMode::Shallow)
36+
fn gitoxide_fetch_shallow_dep_two_revs() {
37+
fetch_dep_two_revs(Backend::Gitoxide, RepoMode::Shallow)
3838
}
3939

4040
#[cargo_test]
41-
fn git2_fetch_complete_two_revs_same_deps() {
42-
fetch_two_revs_same_deps(Backend::Git2, RepoMode::Complete)
41+
fn git2_fetch_complete_dep_two_revs() {
42+
fetch_dep_two_revs(Backend::Git2, RepoMode::Complete)
4343
}
4444

45-
fn fetch_two_revs_same_deps(backend: Backend, mode: RepoMode) {
45+
fn fetch_dep_two_revs(backend: Backend, mode: RepoMode) {
4646
let bar = git::new("meta-dep", |project| {
4747
project
4848
.file("Cargo.toml", &basic_manifest("bar", "0.0.0"))
@@ -129,7 +129,7 @@ fn fetch_two_revs_same_deps(backend: Backend, mode: RepoMode) {
129129
}
130130

131131
#[cargo_test]
132-
fn shallow_deps_work_with_revisions_and_branches_mixed_on_same_dependency() -> anyhow::Result<()> {
132+
fn gitoxide_fetch_shallow_dep_branch_and_rev() -> anyhow::Result<()> {
133133
let (bar, bar_repo) = git::new_repo("bar", |p| {
134134
p.file("Cargo.toml", &basic_manifest("bar", "1.0.0"))
135135
.file("src/lib.rs", "")
@@ -187,7 +187,7 @@ fn shallow_deps_work_with_revisions_and_branches_mixed_on_same_dependency() -> a
187187
}
188188

189189
#[cargo_test]
190-
fn gitoxide_git_dependencies_switch_from_branch_to_rev() -> anyhow::Result<()> {
190+
fn gitoxide_fetch_shallow_dep_branch_to_rev() -> anyhow::Result<()> {
191191
// db exists from previous build, then dependency changes to refer to revision that isn't
192192
// available in the shallow fetch.
193193

@@ -266,8 +266,7 @@ fn gitoxide_git_dependencies_switch_from_branch_to_rev() -> anyhow::Result<()> {
266266
}
267267

268268
#[cargo_test]
269-
fn gitoxide_fetch_registry_with_shallow_protocol_and_follow_up_with_git2_fetch(
270-
) -> anyhow::Result<()> {
269+
fn gitoxide_fetch_shallow_index_then_git2_fetch_complete() -> anyhow::Result<()> {
271270
Package::new("bar", "1.0.0").publish();
272271
let p = project()
273272
.file(
@@ -323,8 +322,7 @@ fn gitoxide_fetch_registry_with_shallow_protocol_and_follow_up_with_git2_fetch(
323322
}
324323

325324
#[cargo_test]
326-
fn gitoxide_fetch_git_dependency_with_shallow_protocol_and_git2_is_used_for_followup_fetches(
327-
) -> anyhow::Result<()> {
325+
fn gitoxide_fetch_shallow_dep_then_git2_fetch_complete() -> anyhow::Result<()> {
328326
// Example where an old lockfile with an explicit branch="master" in Cargo.toml.
329327
Package::new("bar", "1.0.0").publish();
330328
let (bar, bar_repo) = git::new_repo("bar", |p| {
@@ -461,7 +459,7 @@ fn gitoxide_fetch_git_dependency_with_shallow_protocol_and_git2_is_used_for_foll
461459
}
462460

463461
#[cargo_test]
464-
fn gitoxide_shallow_fetch_followed_by_non_shallow_update() -> anyhow::Result<()> {
462+
fn gitoxide_fetch_shallow_dep_then_gitoxide_fetch_complete() -> anyhow::Result<()> {
465463
Package::new("bar", "1.0.0").publish();
466464
let (bar, bar_repo) = git::new_repo("bar", |p| {
467465
p.file("Cargo.toml", &basic_manifest("bar", "1.0.0"))
@@ -600,8 +598,7 @@ fn gitoxide_shallow_fetch_followed_by_non_shallow_update() -> anyhow::Result<()>
600598
}
601599

602600
#[cargo_test]
603-
fn gitoxide_fetch_registry_with_shallow_protocol_and_follow_up_fetch_maintains_shallowness(
604-
) -> anyhow::Result<()> {
601+
fn gitoxide_fetch_shallow_index_then_preserve_shallow() -> anyhow::Result<()> {
605602
Package::new("bar", "1.0.0").publish();
606603
let p = project()
607604
.file(
@@ -674,8 +671,7 @@ fn gitoxide_fetch_registry_with_shallow_protocol_and_follow_up_fetch_maintains_s
674671

675672
/// If there is shallow *and* non-shallow fetches, non-shallow will naturally be returned due to sort order.
676673
#[cargo_test]
677-
fn gitoxide_fetch_registry_without_shallow_protocol_and_follow_up_fetch_uses_shallowness(
678-
) -> anyhow::Result<()> {
674+
fn gitoxide_fetch_complete_index_then_shallow() -> anyhow::Result<()> {
679675
Package::new("bar", "1.0.0").publish();
680676
let p = project()
681677
.file(
@@ -765,8 +761,7 @@ fn gitoxide_fetch_registry_without_shallow_protocol_and_follow_up_fetch_uses_sha
765761
}
766762

767763
#[cargo_test]
768-
fn gitoxide_fetch_registry_with_shallow_protocol_and_aborts_and_updates_again() -> anyhow::Result<()>
769-
{
764+
fn gitoxide_fetch_shallow_index_then_abort_and_update() -> anyhow::Result<()> {
770765
Package::new("bar", "1.0.0").publish();
771766
let p = project()
772767
.file(

0 commit comments

Comments
 (0)