Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #13 from DRK3/fixMockStore
Browse files Browse the repository at this point in the history
fix: Make MockStore implement Store interface
  • Loading branch information
Derek Trider authored Feb 24, 2020
2 parents 6de326a + da7e594 commit 9b39cfa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/storage/mockstore/mockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
// Provider mock store provider.
type Provider struct {
Store *MockStore
ErrCreateStore error
ErrOpenStoreHandle error
FailNameSpace string
}
Expand All @@ -27,6 +28,11 @@ func NewMockStoreProvider() *Provider {
}}
}

// CreateStore creates a new store with the given name.
func (p *Provider) CreateStore(name string) error {
return p.ErrCreateStore
}

// OpenStore opens and returns a store for given name space.
func (p *Provider) OpenStore(name string) (storage.Store, error) {
if name == p.FailNameSpace {
Expand Down

0 comments on commit 9b39cfa

Please sign in to comment.