(c *C)
| 2444 | } |
| 2445 | |
| 2446 | func (s *RepositorySuite) TestCommits(c *C) { |
| 2447 | r, _ := Init(memory.NewStorage(), nil) |
| 2448 | err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()}) |
| 2449 | c.Assert(err, IsNil) |
| 2450 | |
| 2451 | count := 0 |
| 2452 | commits, err := r.CommitObjects() |
| 2453 | c.Assert(err, IsNil) |
| 2454 | for { |
| 2455 | commit, err := commits.Next() |
| 2456 | if err != nil { |
| 2457 | break |
| 2458 | } |
| 2459 | |
| 2460 | count++ |
| 2461 | c.Assert(commit.Hash.IsZero(), Equals, false) |
| 2462 | c.Assert(commit.Hash, Equals, commit.ID()) |
| 2463 | c.Assert(commit.Type(), Equals, plumbing.CommitObject) |
| 2464 | } |
| 2465 | |
| 2466 | c.Assert(count, Equals, 9) |
| 2467 | } |
| 2468 | |
| 2469 | func (s *RepositorySuite) TestBlob(c *C) { |
| 2470 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected