summaryrefslogtreecommitdiff
path: root/git_test.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-02-27 16:36:44 -0800
committerJesse Ezell <[email protected]>2014-02-27 16:36:44 -0800
commit374e2112dfc298fa5ecb0805624d75b3500cc345 (patch)
tree9da99d97412bee3ad8a5c0afdd97873f979b514b /git_test.go
parente2db9b16cda4aec7c94efc19cf2379578bef1b48 (diff)
add push, refine remotes
Diffstat (limited to 'git_test.go')
-rw-r--r--git_test.go15
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
}
-