remove stale test
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
2e674c44cf
commit
8451d3b7b7
@ -6,29 +6,10 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
go_api "github.com/unistack-org/micro/v3/api/proto"
|
|
||||||
jsonpb "google.golang.org/protobuf/encoding/protojson"
|
|
||||||
"google.golang.org/protobuf/proto"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRequestPayloadFromRequest(t *testing.T) {
|
func TestRequestPayloadFromRequest(t *testing.T) {
|
||||||
|
|
||||||
// our test event so that we can validate serialising / deserializing of true protos works
|
|
||||||
protoEvent := go_api.Event{
|
|
||||||
Name: "Test",
|
|
||||||
}
|
|
||||||
|
|
||||||
protoBytes, err := proto.Marshal(&protoEvent)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal("Failed to marshal proto", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
jsonBytes, err := jsonpb.Marshal(&protoEvent)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal("Failed to marshal proto to JSON ", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
jsonUrlBytes := []byte(`{"key1":"val1","key2":"val2","name":"Test"}`)
|
jsonUrlBytes := []byte(`{"key1":"val1","key2":"val2","name":"Test"}`)
|
||||||
|
|
||||||
t.Run("extracting a json from a POST request with url params", func(t *testing.T) {
|
t.Run("extracting a json from a POST request with url params", func(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user