[v3] remove using global map for default codecs (#224)
* remove using global map for default codecs * fix tests
This commit is contained in:
@@ -3,6 +3,8 @@ package client
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
)
|
||||
|
||||
type testHook struct {
|
||||
@@ -19,7 +21,7 @@ func (t *testHook) Publish(fn FuncPublish) FuncPublish {
|
||||
func TestNoopHook(t *testing.T) {
|
||||
h := &testHook{}
|
||||
|
||||
c := NewClient(Hooks(HookPublish(h.Publish)))
|
||||
c := NewClient(Codec("application/octet-stream", codec.NewCodec()), Hooks(HookPublish(h.Publish)))
|
||||
|
||||
if err := c.Init(); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user