diff options
author | Sunny <me@darkowlzz.space> | 2017-11-24 15:26:57 +0530 |
---|---|---|
committer | Sunny <me@darkowlzz.space> | 2017-11-24 16:04:22 +0530 |
commit | 6078b09a3988ef207858d9b74f8de51f4cd65ff4 (patch) | |
tree | 53cfd2fa5af52a6de17090c783353dc3de76c155 | |
parent | 42719aa2372fa8d5b9b33aeda8b1904214991e4c (diff) | |
download | go-git-6078b09a3988ef207858d9b74f8de51f4cd65ff4.tar.gz |
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.
-rw-r--r-- | plumbing/object/commit_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
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"), |