diff options
author | Valery Piashchynski <[email protected]> | 2021-01-07 13:29:07 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-07 13:29:07 +0300 |
commit | 21689afbc5f717274cd608358ffca3bdacb38f69 (patch) | |
tree | 159ddd2b154a5afbec5dedc75a1a94c5a83ebfae /plugins/kv/memory/storage_test.go | |
parent | c1465d3bcdf24a78440300aa51e7cfc92ce874a8 (diff) |
Fix compatibility issues, add tests to the CI
Diffstat (limited to 'plugins/kv/memory/storage_test.go')
-rw-r--r-- | plugins/kv/memory/storage_test.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/kv/memory/storage_test.go b/plugins/kv/memory/storage_test.go index 4b30460d..d3b24860 100644 --- a/plugins/kv/memory/storage_test.go +++ b/plugins/kv/memory/storage_test.go @@ -7,11 +7,26 @@ import ( "time" "github.com/spiral/roadrunner/v2/plugins/kv" + "github.com/spiral/roadrunner/v2/plugins/logger" "github.com/stretchr/testify/assert" + "go.uber.org/zap" ) func initStorage() kv.Storage { - return NewInMemoryStorage() + p := &Plugin{ + stop: make(chan struct{}), + } + p.cfg = &Config{ + Enabled: true, + Interval: 1, + } + + l, _ := zap.NewDevelopment() + p.log = logger.NewZapAdapter(l) + + go p.gc() + + return p } func cleanup(t *testing.T, s kv.Storage, keys ...string) { |