aboutsummaryrefslogtreecommitdiffstats
path: root/formats/packfile/decoder_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'formats/packfile/decoder_test.go')
-rw-r--r--formats/packfile/decoder_test.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/formats/packfile/decoder_test.go b/formats/packfile/decoder_test.go
index 48790b4..aa178d7 100644
--- a/formats/packfile/decoder_test.go
+++ b/formats/packfile/decoder_test.go
@@ -33,7 +33,7 @@ func (s *ReaderSuite) TestDecode(c *C) {
scanner := NewScanner(f.Packfile())
storage := memory.NewStorage()
- d, err := NewDecoder(scanner, storage.ObjectStorage())
+ d, err := NewDecoder(scanner, storage)
c.Assert(err, IsNil)
defer d.Close()
@@ -97,7 +97,7 @@ func (s *ReaderSuite) TestDecodeCRCs(c *C) {
scanner := NewScanner(f.Packfile())
storage := memory.NewStorage()
- d, err := NewDecoder(scanner, storage.ObjectStorage())
+ d, err := NewDecoder(scanner, storage)
c.Assert(err, IsNil)
_, err = d.Decode()
c.Assert(err, IsNil)
@@ -158,11 +158,9 @@ func (s *ReaderSuite) TestSetOffsets(c *C) {
}
func assertObjects(c *C, s *memory.Storage, expects []string) {
- o := s.ObjectStorage().(*memory.ObjectStorage)
-
- c.Assert(len(expects), Equals, len(o.Objects))
+ c.Assert(len(expects), Equals, len(s.Objects))
for _, exp := range expects {
- obt, err := o.Get(core.AnyObject, core.NewHash(exp))
+ obt, err := s.Object(core.AnyObject, core.NewHash(exp))
c.Assert(err, IsNil)
c.Assert(obt.Hash().String(), Equals, exp)
}