From 70e58e881c30398800081539e1b20580f214e599 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 8 Feb 2023 14:59:33 +0300 Subject: [PATCH] update deps and tests Signed-off-by: Vasiliy Tolstov --- go.mod | 2 +- go.sum | 4 ++-- logger/unwrap/unwrap_test.go | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2a708da..cdf8906 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( go.unistack.org/micro-tracer-opentracing/v3 v3.10.1 go.unistack.org/micro-wrapper-recovery/v3 v3.8.3 go.unistack.org/micro-wrapper-sql/v3 v3.10.2 - go.unistack.org/micro/v3 v3.10.8 + go.unistack.org/micro/v3 v3.10.9 golang.org/x/crypto v0.5.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa // indirect diff --git a/go.sum b/go.sum index 3106284..e66dec5 100644 --- a/go.sum +++ b/go.sum @@ -946,8 +946,8 @@ go.unistack.org/micro/v3 v3.9.18/go.mod h1:gI4RkJKHLPW7KV6h4+ZBOZD997MRvFRXMPQIH go.unistack.org/micro/v3 v3.10.1/go.mod h1:gI4RkJKHLPW7KV6h4+ZBOZD997MRvFRXMPQIHpozikI= go.unistack.org/micro/v3 v3.10.4/go.mod h1:gI4RkJKHLPW7KV6h4+ZBOZD997MRvFRXMPQIHpozikI= go.unistack.org/micro/v3 v3.10.5/go.mod h1:gI4RkJKHLPW7KV6h4+ZBOZD997MRvFRXMPQIHpozikI= -go.unistack.org/micro/v3 v3.10.8 h1:vl8fHYgWp6WadvVy4LtJ8lc3e8Y0VrfBOU5EorZ3PIA= -go.unistack.org/micro/v3 v3.10.8/go.mod h1:gI4RkJKHLPW7KV6h4+ZBOZD997MRvFRXMPQIHpozikI= +go.unistack.org/micro/v3 v3.10.9 h1:o8gdlE5JC9b2sm89RmztQPHnP4thN6FkGZyrKrahxX8= +go.unistack.org/micro/v3 v3.10.9/go.mod h1:gI4RkJKHLPW7KV6h4+ZBOZD997MRvFRXMPQIHpozikI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/logger/unwrap/unwrap_test.go b/logger/unwrap/unwrap_test.go index 2402bfd..a9e731c 100644 --- a/logger/unwrap/unwrap_test.go +++ b/logger/unwrap/unwrap_test.go @@ -7,9 +7,23 @@ import ( "testing" "github.com/golang/protobuf/ptypes/wrappers" + pb "go.unistack.org/micro-tests/client/grpc/proto" "go.unistack.org/micro/v3/logger/unwrap" ) +func TestProtoMessage(t *testing.T) { + type Response struct { + Val *pb.Response `logger:"take"` + } + val := &Response{Val: &pb.Response{Msg: "test"}} + + buf := fmt.Sprintf("%#v", unwrap.Unwrap(val, unwrap.Tagged(true))) + cmp := `&unwrap_test.Response{Val:(*helloworld.Response){Msg:"test"}}` + if strings.Compare(buf, cmp) != 0 { + t.Fatalf("not proper written \n%s\n%s", cmp, buf) + } +} + func TestWrappers(t *testing.T) { type CustomerInfo struct { MainPhone *wrappers.StringValue `logger:"take"`