Skip to content

Commit bd1a02c

Browse files
weihangloepage
andcommitted
test(git): add more fetch-index backend interop
Co-authored-by: Ed Page <eopage@gmail.com>
1 parent ff4d929 commit bd1a02c

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

tests/testsuite/git_shallow.rs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,36 @@ fn gitoxide_fetch_shallow_index_then_git2_fetch_complete() -> anyhow::Result<()>
344344
)
345345
}
346346

347+
#[cargo_test]
348+
fn gitoxide_fetch_shallow_index_then_git_cli_fetch_shallow() -> anyhow::Result<()> {
349+
fetch_index_then_fetch(
350+
Backend::Gitoxide,
351+
RepoMode::Shallow,
352+
Backend::GitCli,
353+
RepoMode::Shallow,
354+
)
355+
}
356+
357+
#[cargo_test]
358+
fn gitoxide_fetch_complete_index_then_git_cli_fetch_shallow() -> anyhow::Result<()> {
359+
fetch_index_then_fetch(
360+
Backend::Gitoxide,
361+
RepoMode::Complete,
362+
Backend::GitCli,
363+
RepoMode::Shallow,
364+
)
365+
}
366+
367+
#[cargo_test]
368+
fn gitoxide_fetch_shallow_index_then_git_cli_fetch_complete() -> anyhow::Result<()> {
369+
fetch_index_then_fetch(
370+
Backend::Gitoxide,
371+
RepoMode::Shallow,
372+
Backend::GitCli,
373+
RepoMode::Complete,
374+
)
375+
}
376+
347377
#[cargo_test]
348378
fn git_cli_fetch_shallow_index_then_git2_fetch_complete() -> anyhow::Result<()> {
349379
fetch_index_then_fetch(
@@ -354,6 +384,36 @@ fn git_cli_fetch_shallow_index_then_git2_fetch_complete() -> anyhow::Result<()>
354384
)
355385
}
356386

387+
#[cargo_test]
388+
fn git_cli_fetch_shallow_index_then_gitoxide_fetch_shallow() -> anyhow::Result<()> {
389+
fetch_index_then_fetch(
390+
Backend::GitCli,
391+
RepoMode::Shallow,
392+
Backend::Gitoxide,
393+
RepoMode::Shallow,
394+
)
395+
}
396+
397+
#[cargo_test]
398+
fn git_cli_fetch_shallow_complete_then_gitoxide_fetch_complete() -> anyhow::Result<()> {
399+
fetch_index_then_fetch(
400+
Backend::GitCli,
401+
RepoMode::Complete,
402+
Backend::Gitoxide,
403+
RepoMode::Shallow,
404+
)
405+
}
406+
407+
#[cargo_test]
408+
fn git_cli_fetch_shallow_index_then_gitoxide_fetch_complete() -> anyhow::Result<()> {
409+
fetch_index_then_fetch(
410+
Backend::GitCli,
411+
RepoMode::Shallow,
412+
Backend::Gitoxide,
413+
RepoMode::Complete,
414+
)
415+
}
416+
357417
fn fetch_index_then_fetch(
358418
backend_1st: Backend,
359419
mode_1st: RepoMode,

0 commit comments

Comments
 (0)