mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
fix test break for refactor data into seperate package
This commit is contained in:
parent
7d02c26219
commit
51f05b1bff
@ -2,6 +2,7 @@ package v4_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/socketcfg"
|
||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
|
||||
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
|
||||
"testing"
|
||||
@ -24,7 +25,7 @@ import (
|
||||
func TestSocketConfig(t *testing.T) {
|
||||
createParser := func() func(string) (proto.Message, error) {
|
||||
return func(s string) (proto.Message, error) {
|
||||
config := new(v4.SocketConfig)
|
||||
config := new(socketcfg.SocketConfig)
|
||||
if err := json.Unmarshal([]byte(s), config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package v4_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/muxcfg"
|
||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
|
||||
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
@ -368,7 +369,7 @@ func TestMuxConfig_Build(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
m := &v4.MuxConfig{}
|
||||
m := &muxcfg.MuxConfig{}
|
||||
common.Must(json.Unmarshal([]byte(tt.fields), m))
|
||||
if got := m.Build(); !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("MuxConfig.Build() = %v, want %v", got, tt.want)
|
||||
|
Loading…
Reference in New Issue
Block a user