From a6b31490bdecc997c3a33023d4a1389ef0f003ad Mon Sep 17 00:00:00 2001 From: anirut Date: Thu, 1 Sep 2022 00:37:34 +0700 Subject: [PATCH] test(transport) add client test --- transport/http/client_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/transport/http/client_test.go b/transport/http/client_test.go index 4ee00456f..2da7dc0ca 100644 --- a/transport/http/client_test.go +++ b/transport/http/client_test.go @@ -363,4 +363,11 @@ func TestNewClient(t *testing.T) { if err == nil { t.Error("err should be equal to encoder error") } + headersCallOpt := Headers(map[string]string{ + "trace_id": "xxxx", + }) + err = client.Invoke(context.Background(), "POST", "/go", map[string]string{"name": "kratos"}, nil, headersCallOpt) + if err == nil { + t.Error("err should be equal to encoder error") + } }