test(storage): add single server test
This commit is contained in:
parent
f7d4cee102
commit
5934e88e03
|
@ -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)
|
||||
}
|
Loading…
Reference in New Issue