diff --git a/storage/server/single_test.go b/storage/server/single_test.go new file mode 100644 index 0000000..7c098fb --- /dev/null +++ b/storage/server/single_test.go @@ -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) +}