forked from p53841790/wheat-cache
test(client): add client
This commit is contained in:
parent
57e84b6dee
commit
3c68787ff4
|
@ -0,0 +1,23 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"gitee.com/timedb/wheatCache/client/middle"
|
||||
"gitee.com/timedb/wheatCache/pkg/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestClient(t *testing.T) {
|
||||
cli, err := NewWheatClient("127.0.0.1:5891", middle.WithUnaryColonyClient)
|
||||
require.NoError(t, err)
|
||||
ctx := context.Background()
|
||||
_, err = cli.Set(ctx, &proto.SetRequest{
|
||||
Key: &proto.BaseKey{
|
||||
Key: "apple",
|
||||
},
|
||||
Val: "yyyy",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
Loading…
Reference in New Issue