Skip to content

Commit

Permalink
fix tests - update storer stub
Browse files Browse the repository at this point in the history
  • Loading branch information
ssd04 committed Mar 26, 2024
1 parent c289b13 commit a722602
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testscommon/pruningStorerStub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a722602

Please sign in to comment.