diff options
| author | Jesse Ezell <[email protected]> | 2014-02-27 16:36:44 -0800 |
|---|---|---|
| committer | Jesse Ezell <[email protected]> | 2014-02-27 16:36:44 -0800 |
| commit | 374e2112dfc298fa5ecb0805624d75b3500cc345 (patch) | |
| tree | 9da99d97412bee3ad8a5c0afdd97873f979b514b /git_test.go | |
| parent | e2db9b16cda4aec7c94efc19cf2379578bef1b48 (diff) | |
add push, refine remotes
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 } - |
