aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/storer/object_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/storer/object_test.go')
-rw-r--r--plumbing/storer/object_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plumbing/storer/object_test.go b/plumbing/storer/object_test.go
index 6b4fe0f..bc22f7b 100644
--- a/plumbing/storer/object_test.go
+++ b/plumbing/storer/object_test.go
@@ -141,6 +141,16 @@ func (o *MockObjectStorage) HasEncodedObject(h plumbing.Hash) error {
return plumbing.ErrObjectNotFound
}
+func (o *MockObjectStorage) EncodedObjectSize(h plumbing.Hash) (
+ size int64, err error) {
+ for _, o := range o.db {
+ if o.Hash() == h {
+ return o.Size(), nil
+ }
+ }
+ return 0, plumbing.ErrObjectNotFound
+}
+
func (o *MockObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {
for _, o := range o.db {
if o.Hash() == h {