diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-03-18 05:21:35 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-03-18 05:21:35 +0100 |
| commit | 5f35f137372917332cd329cf723a9d005e13d582 (patch) | |
| tree | 5fb0ce34a23761b99d4873f6d241545a4b84e32d /git_test.go | |
| parent | dbdbb4b0d124ef1f00cb67f84cef2ea35278aeef (diff) | |
| parent | 51aa76d6f7170bba60ab2252b74a3cab0276996f (diff) | |
Merge pull request #61 from jezell/remotes-wip
Cleaned up remotes / clone / add push / fetch
Diffstat (limited to 'git_test.go')
| -rw-r--r-- | git_test.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/git_test.go b/git_test.go index 52aea1d..fff3c6c 100644 --- a/git_test.go +++ b/git_test.go @@ -1,8 +1,8 @@ package git import ( - "testing" "io/ioutil" + "testing" "time" ) @@ -14,7 +14,17 @@ func createTestRepo(t *testing.T) *Repository { checkFatal(t, err) tmpfile := "README" - err = ioutil.WriteFile(path + "/" + tmpfile, []byte("foo\n"), 0644) + err = ioutil.WriteFile(path+"/"+tmpfile, []byte("foo\n"), 0644) + checkFatal(t, err) + + return repo +} + +func createBareTestRepo(t *testing.T) *Repository { + // figure out where we can create the test repo + path, err := ioutil.TempDir("", "git2go") + checkFatal(t, err) + repo, err := InitRepository(path, true) checkFatal(t, err) return repo @@ -44,4 +54,3 @@ func seedTestRepo(t *testing.T, repo *Repository) (*Oid, *Oid) { return commitId, treeId } - |
