test(storage): add single server test

This commit is contained in:
bandl 2021-10-02 22:13:23 +08:00
parent f7d4cee102
commit 5934e88e03
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package server
import (
"context"
"fmt"
"gitee.com/timedb/wheatCache/pkg/proto"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"testing"
)
func TestServerSingle_Get(t *testing.T) {
comm, err := grpc.Dial("127.0.0.1:5890", grpc.WithInsecure())
require.NoError(t, err)
ctx := context.Background()
cli := proto.NewCommServerClient(comm)
resp, err := cli.Get(ctx, &proto.GetRequest{
})
require.NoError(t, err)
fmt.Println(resp)
}