From a722602c484dcaf55d9a8940c4e46853f14b7b9f Mon Sep 17 00:00:00 2001 From: ssd04 Date: Tue, 26 Mar 2024 10:20:47 +0200 Subject: [PATCH] fix tests - update storer stub --- testscommon/pruningStorerStub.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testscommon/pruningStorerStub.go b/testscommon/pruningStorerStub.go index 2d1494a..a9608a3 100644 --- a/testscommon/pruningStorerStub.go +++ b/testscommon/pruningStorerStub.go @@ -6,6 +6,7 @@ type PruningStorerStub struct { PutCalled func(key []byte, data []byte) error PruneCalled func(index uint64) error DumpCalled func() error + CloseCalled func() error } // Get - @@ -44,6 +45,15 @@ func (p *PruningStorerStub) Dump() error { return nil } +// Close - +func (p *PruningStorerStub) Close() error { + if p.CloseCalled != nil { + return p.CloseCalled() + } + + return nil +} + // IsInterfaceNil - func (p *PruningStorerStub) IsInterfaceNil() bool { return p == nil