(c *C)
| 162 | } |
| 163 | |
| 164 | func (s *FsSuite) TestGetSizeOfObjectFile(c *C) { |
| 165 | fs := fixtures.ByTag(".git").ByTag("unpacked").One().DotGit() |
| 166 | o := NewObjectStorage(dotgit.New(fs), cache.NewObjectLRUDefault()) |
| 167 | |
| 168 | // Get the size of `tree_walker.go`. |
| 169 | expected := plumbing.NewHash("cbd81c47be12341eb1185b379d1c82675aeded6a") |
| 170 | size, err := o.EncodedObjectSize(expected) |
| 171 | c.Assert(err, IsNil) |
| 172 | c.Assert(size, Equals, int64(2412)) |
| 173 | } |
| 174 | |
| 175 | func (s *FsSuite) TestGetSizeFromPackfile(c *C) { |
| 176 | fixtures.Basic().ByTag(".git").Test(c, func(f *fixtures.Fixture) { |
nothing calls this directly
no test coverage detected