summaryrefslogtreecommitdiff
path: root/reference_test.go
diff options
context:
space:
mode:
authorAidan Nulman <[email protected]>2014-01-29 18:01:26 -0500
committerAidan Nulman <[email protected]>2014-01-29 18:01:26 -0500
commitf66502aaf44862a8671285e80327d808afee155f (patch)
tree53d207cf045ced480b5d8c3253017098b8860c6a /reference_test.go
parentd8c3772e350f387bb55b74dc1d654d69bd66b69a (diff)
update git2go to support latest libgit2 development commit (id: 66af84)
Diffstat (limited to 'reference_test.go')
-rw-r--r--reference_test.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/reference_test.go b/reference_test.go
index f955a2c..ab62522 100644
--- a/reference_test.go
+++ b/reference_test.go
@@ -14,7 +14,14 @@ func TestRefModification(t *testing.T) {
commitId, treeId := seedTestRepo(t, repo)
- _, err := repo.CreateReference("refs/tags/tree", treeId, true)
+ loc, err := time.LoadLocation("Europe/Berlin")
+ checkFatal(t, err)
+ sig := &Signature{
+ Name: "Rand Om Hacker",
+ Email: "[email protected]",
+ When: time.Date(2013, 03, 06, 14, 30, 0, 0, loc),
+ }
+ _, err = repo.CreateReference("refs/tags/tree", treeId, true, sig, "testTreeTag")
checkFatal(t, err)
tag, err := repo.LookupReference("refs/tags/tree")
@@ -78,13 +85,13 @@ func TestIterator(t *testing.T) {
commitId, err := repo.CreateCommit("HEAD", sig, sig, message, tree)
checkFatal(t, err)
- _, err = repo.CreateReference("refs/heads/one", commitId, true)
+ _, err = repo.CreateReference("refs/heads/one", commitId, true, sig, "headOne")
checkFatal(t, err)
- _, err = repo.CreateReference("refs/heads/two", commitId, true)
+ _, err = repo.CreateReference("refs/heads/two", commitId, true, sig, "headTwo")
checkFatal(t, err)
- _, err = repo.CreateReference("refs/heads/three", commitId, true)
+ _, err = repo.CreateReference("refs/heads/three", commitId, true, sig, "headThree")
checkFatal(t, err)
iter, err := repo.NewReferenceIterator()
@@ -108,7 +115,6 @@ func TestIterator(t *testing.T) {
t.Fatal("Iteration not over")
}
-
sort.Strings(list)
compareStringList(t, expected, list)
@@ -129,7 +135,6 @@ func TestIterator(t *testing.T) {
t.Fatalf("Wrong number of references returned %v", count)
}
-
// test the channel iteration
list = []string{}
iter, err = repo.NewReferenceIterator()