(c *C)
| 1761 | } |
| 1762 | |
| 1763 | func (s *RepositorySuite) TestLog(c *C) { |
| 1764 | r, _ := Init(memory.NewStorage(), nil) |
| 1765 | err := r.clone(context.Background(), &CloneOptions{ |
| 1766 | URL: s.GetBasicLocalRepositoryURL(), |
| 1767 | }) |
| 1768 | |
| 1769 | c.Assert(err, IsNil) |
| 1770 | |
| 1771 | cIter, err := r.Log(&LogOptions{ |
| 1772 | From: plumbing.NewHash("b8e471f58bcbca63b07bda20e428190409c2db47"), |
| 1773 | }) |
| 1774 | |
| 1775 | c.Assert(err, IsNil) |
| 1776 | |
| 1777 | commitOrder := []plumbing.Hash{ |
| 1778 | plumbing.NewHash("b8e471f58bcbca63b07bda20e428190409c2db47"), |
| 1779 | plumbing.NewHash("b029517f6300c2da0f4b651b8642506cd6aaf45d"), |
| 1780 | } |
| 1781 | |
| 1782 | for _, o := range commitOrder { |
| 1783 | commit, err := cIter.Next() |
| 1784 | c.Assert(err, IsNil) |
| 1785 | c.Assert(commit.Hash, Equals, o) |
| 1786 | } |
| 1787 | _, err = cIter.Next() |
| 1788 | c.Assert(err, Equals, io.EOF) |
| 1789 | } |
| 1790 | |
| 1791 | func (s *RepositorySuite) TestLogAll(c *C) { |
| 1792 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected