snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
25
internal/proxyproto/proxy_test.go
Normal file
25
internal/proxyproto/proxy_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package proxyproto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
func TestMarshalJSON(t *testing.T) {
|
||||
msg := &RPCRequest{
|
||||
Data: []byte(`{"input": "привет"}`),
|
||||
}
|
||||
_, err := json.Marshal(msg)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestMarshalProtobuf(t *testing.T) {
|
||||
msg := &RPCRequest{
|
||||
Data: []byte(`{"input": "привет"}`),
|
||||
}
|
||||
_, err := proto.Marshal(msg)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
Reference in New Issue
Block a user