(c *C)
| 128 | } |
| 129 | |
| 130 | func (s *FsSuite) TestGetSizeOfObjectFile(c *C) { |
| 131 | fs := fixtures.ByTag(".git").ByTag("unpacked").One().DotGit() |
| 132 | o := NewObjectStorage(dotgit.New(fs), cache.NewObjectLRUDefault()) |
| 133 | |
| 134 | // Get the size of `tree_walker.go`. |
| 135 | expected := plumbing.NewHash("cbd81c47be12341eb1185b379d1c82675aeded6a") |
| 136 | size, err := o.EncodedObjectSize(expected) |
| 137 | c.Assert(err, IsNil) |
| 138 | c.Assert(size, Equals, int64(2412)) |
| 139 | } |
| 140 | |
| 141 | func (s *FsSuite) TestGetSizeFromPackfile(c *C) { |
| 142 | fixtures.Basic().ByTag(".git").Test(c, func(f *fixtures.Fixture) { |
nothing calls this directly
no test coverage detected