-
Notifications
You must be signed in to change notification settings - Fork 43
/
mock_test.go
77 lines (58 loc) · 1.9 KB
/
mock_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package valkeyrie
import (
"context"
"github.com/kvtools/valkeyrie/store"
)
const testStoreName = "mock"
func newStore(ctx context.Context, endpoints []string, options Config) (store.Store, error) {
cfg, ok := options.(*Config)
if !ok && options != nil {
return nil, &store.InvalidConfigurationError{Store: testStoreName, Config: options}
}
return New(ctx, endpoints, cfg)
}
type Mock struct {
cfg *Config
}
// New creates a new Mock client.
//
//nolint:gocritic
func New(_ context.Context, _ []string, cfg *Config) (*Mock, error) {
return &Mock{cfg: cfg}, nil
}
func (m Mock) Put(_ context.Context, _ string, _ []byte, _ *store.WriteOptions) error {
panic("implement me")
}
func (m Mock) Get(_ context.Context, _ string, _ *store.ReadOptions) (*store.KVPair, error) {
panic("implement me")
}
func (m Mock) Delete(_ context.Context, _ string) error {
panic("implement me")
}
func (m Mock) Exists(_ context.Context, _ string, _ *store.ReadOptions) (bool, error) {
panic("implement me")
}
func (m Mock) Watch(_ context.Context, _ string, _ *store.ReadOptions) (<-chan *store.KVPair, error) {
panic("implement me")
}
func (m Mock) WatchTree(_ context.Context, _ string, _ *store.ReadOptions) (<-chan []*store.KVPair, error) {
panic("implement me")
}
func (m Mock) NewLock(_ context.Context, _ string, _ *store.LockOptions) (store.Locker, error) {
panic("implement me")
}
func (m Mock) List(_ context.Context, _ string, _ *store.ReadOptions) ([]*store.KVPair, error) {
panic("implement me")
}
func (m Mock) DeleteTree(_ context.Context, _ string) error {
panic("implement me")
}
func (m Mock) AtomicPut(_ context.Context, _ string, _ []byte, _ *store.KVPair, _ *store.WriteOptions) (bool, *store.KVPair, error) {
panic("implement me")
}
func (m Mock) AtomicDelete(_ context.Context, _ string, _ *store.KVPair) (bool, error) {
panic("implement me")
}
func (m Mock) Close() error {
panic("implement me")
}