From c2270f4bc01d075b448797543344118768f2fd80 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 5 Oct 2022 02:51:12 +0700 Subject: lib/git: fix test with -count=X, where X>1 --- lib/git/git_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/git/git_test.go') diff --git a/lib/git/git_test.go b/lib/git/git_test.go index 0e9bfaeb..6b1098d9 100644 --- a/lib/git/git_test.go +++ b/lib/git/git_test.go @@ -35,6 +35,7 @@ func TestClone(t *testing.T) { for _, c := range cases { t.Log(c.desc) mock.Reset(true) + os.RemoveAll(_testRepoDir) err := Clone(_testRemoteURL, c.dest) if err != nil { @@ -355,9 +356,6 @@ func TestMain(m *testing.M) { fmt.Printf("remote URL: %s\n", _testRemoteURL) fmt.Printf("repo dir : %s\n", _testRepoDir) - // Cleaning up for TestClone - os.RemoveAll(_testRepoDir) - s := m.Run() mock.Close() -- cgit v1.3