Skip to content

Commit 05a72e0

Browse files
committed
add test for git clone with depth option (#32)
1 parent 7fc0458 commit 05a72e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

githttpxfer/githttpxfer_end_to_end_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ func Test_End_To_End_it_should_succeed_clone_and_push_and_fetch_and_log(t *testi
9595

9696
destDirNameA := "test_a"
9797
destDirNameB := "test_b"
98+
destDirNameC := "test_c"
9899
destDirPathA := path.Join(endToEndTestParams.workingDirPath, destDirNameA)
99100
destDirPathB := path.Join(endToEndTestParams.workingDirPath, destDirNameB)
101+
destDirPathC := path.Join(endToEndTestParams.workingDirPath, destDirNameC)
100102

101103
if _, err := execCmd("", "git", "clone", remoteRepoUrl, destDirPathA); err != nil {
102104
t.Errorf("execute command error: %s", err.Error())
@@ -148,6 +150,11 @@ func Test_End_To_End_it_should_succeed_clone_and_push_and_fetch_and_log(t *testi
148150
return
149151
}
150152

153+
if _, err := execCmd("", "git", "clone", "--depth=1", remoteRepoUrl, destDirPathC); err != nil {
154+
t.Errorf("execute command error: %s", err.Error())
155+
return
156+
}
157+
151158
}
152159

153160
func Test_End_To_End_it_should_succeed_request_to_get_info_refs(t *testing.T) {

0 commit comments

Comments
 (0)