From f66502aaf44862a8671285e80327d808afee155f Mon Sep 17 00:00:00 2001 From: Aidan Nulman Date: Wed, 29 Jan 2014 18:01:26 -0500 Subject: update git2go to support latest libgit2 development commit (id: 66af84) --- reference_test.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'reference_test.go') 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: "random@hacker.com", + 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() -- cgit v1.2.3