summaryrefslogtreecommitdiff
path: root/reference_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'reference_test.go')
-rw-r--r--reference_test.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/reference_test.go b/reference_test.go
index f955a2c..156960a 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")
@@ -45,7 +52,7 @@ func TestRefModification(t *testing.T) {
t.Fatalf("Wrong ref target")
}
- _, err = tag.Rename("refs/tags/renamed", false)
+ _, err = tag.Rename("refs/tags/renamed", false, nil, "")
checkFatal(t, err)
tag, err = repo.LookupReference("refs/tags/renamed")
checkFatal(t, err)
@@ -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()