forked from p93542168/wheat-cache
23 lines
459 B
Go
23 lines
459 B
Go
|
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)
|
||
|
}
|