From 6078b09a3988ef207858d9b74f8de51f4cd65ff4 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 24 Nov 2017 15:26:57 +0530 Subject: test: plumbing/object fix Commit.Verify test Test was failing because of the relative time zone attached to the commit. Adding a fixed location to the time fixes the issue. --- plumbing/object/commit_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plumbing') diff --git a/plumbing/object/commit_test.go b/plumbing/object/commit_test.go index 3f178a8..2f5e075 100644 --- a/plumbing/object/commit_test.go +++ b/plumbing/object/commit_test.go @@ -299,10 +299,11 @@ func (s *SuiteCommit) TestStat(c *C) { func (s *SuiteCommit) TestVerify(c *C) { ts := time.Unix(1511197315, 0) + loc, _ := time.LoadLocation("Asia/Kolkata") commit := &Commit{ Hash: plumbing.NewHash("8a9cea36fe052711fbc42b86e1f99a4fa0065deb"), - Author: Signature{Name: "Sunny", Email: "me@darkowlzz.space", When: ts}, - Committer: Signature{Name: "Sunny", Email: "me@darkowlzz.space", When: ts}, + Author: Signature{Name: "Sunny", Email: "me@darkowlzz.space", When: ts.In(loc)}, + Committer: Signature{Name: "Sunny", Email: "me@darkowlzz.space", When: ts.In(loc)}, Message: `status: simplify template command selection `, TreeHash: plumbing.NewHash("6572ba6df4f1fb323c8aaa24ce07bca0648b161e"), -- cgit