aboutsummaryrefslogtreecommitdiff
path: root/lib/git/git_test.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2019-11-15 01:40:35 +0700
committerShulhan <m.shulhan@gmail.com>2019-11-15 01:40:35 +0700
commit1de75b90ee86f1e22d6734b735c54763951dcf4b (patch)
treef65c43636215b8f65fdd63fa76ac0e52bf4c618e /lib/git/git_test.go
parenta1ec2b3af197861e514cc45ab6502b06ad633c0f (diff)
downloadpakakeh.go-1de75b90ee86f1e22d6734b735c54763951dcf4b.tar.xz
lib/git: fix the test using full path URL and repository directory
Diffstat (limited to 'lib/git/git_test.go')
-rw-r--r--lib/git/git_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/git/git_test.go b/lib/git/git_test.go
index 1e182368..2fda66df 100644
--- a/lib/git/git_test.go
+++ b/lib/git/git_test.go
@@ -13,10 +13,9 @@ import (
"github.com/shuLhan/share/lib/test/mock"
)
-const _testRepoDir = "testdata/beku_test"
-
//nolint:gochecknoglobals
var (
+ _testRepoDir string
_testRemoteURL string
)
@@ -342,13 +341,16 @@ func TestMain(m *testing.M) {
panic(err)
}
- _testRemoteURL = wd + "/testdata/beku_test.git"
+ _testRemoteURL = "file://" + wd + "/testdata/beku_test.git"
+ _testRepoDir = wd + "/testdata/repotest"
_stdout = mock.Stdout()
_stderr = mock.Stderr()
fmt.Printf("stdout: %+v\n", _stdout.Name())
- fmt.Printf("stderr: %+v\n", _stderr.Name())
+ fmt.Printf("stderr : %+v\n", _stderr.Name())
+ fmt.Printf("remote URL: %s\n", _testRemoteURL)
+ fmt.Printf("repo dir : %s\n", _testRepoDir)
// Cleaning up for TestClone
os.RemoveAll(_testRepoDir)