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 /tests/plugins | |
parent | c1465d3bcdf24a78440300aa51e7cfc92ce874a8 (diff) |
Fix compatibility issues, add tests to the CI
Diffstat (limited to 'tests/plugins')
-rw-r--r-- | tests/plugins/kv/memcached/plugin_test.go | 10 | ||||
-rw-r--r-- | tests/plugins/kv/memory/configs/.rr-init.yaml | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/plugins/kv/memcached/plugin_test.go b/tests/plugins/kv/memcached/plugin_test.go index d30de3b6..6eff8715 100644 --- a/tests/plugins/kv/memcached/plugin_test.go +++ b/tests/plugins/kv/memcached/plugin_test.go @@ -149,8 +149,8 @@ func testRPCMethods(t *testing.T) { err = client.Call("memcached.MGet", keys, &mGet) assert.NoError(t, err) assert.Len(t, mGet, 2) // c is expired - assert.Equal(t, string("aa"), mGet["a"].(string)) - assert.Equal(t, string("bb"), mGet["b"].(string)) + assert.Equal(t, string("aa"), string(mGet["a"].([]byte))) + assert.Equal(t, string("bb"), string(mGet["b"].([]byte))) mExpKeys := make([]kv.Item, 0, 2) tt2 := time.Now().Add(time.Second * 10).Format(time.RFC3339) @@ -164,12 +164,12 @@ func testRPCMethods(t *testing.T) { assert.NoError(t, err) assert.True(t, mExpRes) - // TTL + // TTL call is not supported for the memcached driver keys = []string{"a", "b", "d"} ttlRes := make(map[string]interface{}) err = client.Call("memcached.TTL", keys, &ttlRes) - assert.NoError(t, err) - assert.Len(t, ttlRes, 3) + assert.Error(t, err) + assert.Len(t, ttlRes, 0) // HAS AFTER TTL time.Sleep(time.Second * 11) diff --git a/tests/plugins/kv/memory/configs/.rr-init.yaml b/tests/plugins/kv/memory/configs/.rr-init.yaml index 3dceea95..dedc6cd2 100644 --- a/tests/plugins/kv/memory/configs/.rr-init.yaml +++ b/tests/plugins/kv/memory/configs/.rr-init.yaml @@ -39,4 +39,7 @@ http: # in memory KV driver memory: - enabled: true
\ No newline at end of file + enabled: + true + # keys ttl check interval + interval: 1 |