update tests and deps

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-07-05 16:26:57 +03:00
parent 3ceff22f52
commit 32039b342f
17 changed files with 826 additions and 105 deletions

19
broker/broker_test.go Normal file
View File

@@ -0,0 +1,19 @@
package broker
import (
"testing"
jsoncodec "github.com/unistack-org/micro-codec-json/v3"
"github.com/unistack-org/micro/v3/broker"
)
func TestBrokerMessage(t *testing.T) {
c := jsoncodec.NewCodec()
buf := []byte(`{"Header":{"Content-Type":"application\/json","Micro-Topic":"notify"},"Body":{"Class":{}}}`)
msg := &broker.Message{}
if err := c.Unmarshal(buf, msg); err != nil {
t.Fatal(err)
}
}