1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 12:35:21 -05:00

json config parser

This commit is contained in:
Darien Raymond
2016-10-17 14:35:13 +02:00
parent e866ff24a4
commit 5a311cbe08
85 changed files with 9358 additions and 9053 deletions

View File

@@ -4,14 +4,13 @@ import (
"testing"
"v2ray.com/core/common/alloc"
"v2ray.com/core/common/loader"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/vmess"
. "v2ray.com/core/proxy/vmess/encoding"
"v2ray.com/core/testing/assert"
"github.com/golang/protobuf/ptypes"
)
func TestRequestSerialization(t *testing.T) {
@@ -25,9 +24,7 @@ func TestRequestSerialization(t *testing.T) {
Id: uuid.New().String(),
AlterId: 0,
}
anyAccount, err := ptypes.MarshalAny(account)
assert.Error(err).IsNil()
user.Account = anyAccount
user.Account = loader.NewTypedSettings(account)
expectedRequest := &protocol.RequestHeader{
Version: 1,