( c *C, r *Repository, treesCount, blobCount, commitCount int, head plumbing.Hash, )
| 658 | } |
| 659 | |
| 660 | func assertStorageStatus( |
| 661 | c *C, r *Repository, |
| 662 | treesCount, blobCount, commitCount int, head plumbing.Hash, |
| 663 | ) { |
| 664 | trees, err := r.Storer.IterEncodedObjects(plumbing.TreeObject) |
| 665 | c.Assert(err, IsNil) |
| 666 | blobs, err := r.Storer.IterEncodedObjects(plumbing.BlobObject) |
| 667 | c.Assert(err, IsNil) |
| 668 | commits, err := r.Storer.IterEncodedObjects(plumbing.CommitObject) |
| 669 | c.Assert(err, IsNil) |
| 670 | |
| 671 | c.Assert(lenIterEncodedObjects(trees), Equals, treesCount) |
| 672 | c.Assert(lenIterEncodedObjects(blobs), Equals, blobCount) |
| 673 | c.Assert(lenIterEncodedObjects(commits), Equals, commitCount) |
| 674 | |
| 675 | ref, err := r.Head() |
| 676 | c.Assert(err, IsNil) |
| 677 | c.Assert(ref.Hash(), Equals, head) |
| 678 | } |
| 679 | |
| 680 | func lenIterEncodedObjects(iter storer.EncodedObjectIter) int { |
| 681 | count := 0 |
no test coverage detected
searching dependent graphs…