From 51f05b1bff89ac573ed49aea7e6fea2add176d29 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 4 Sep 2021 19:43:10 +0100 Subject: [PATCH] fix test break for refactor data into seperate package --- infra/conf/v4/transport_test.go | 3 ++- infra/conf/v4/v2ray_test.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/infra/conf/v4/transport_test.go b/infra/conf/v4/transport_test.go index dc6667ee6..786078280 100644 --- a/infra/conf/v4/transport_test.go +++ b/infra/conf/v4/transport_test.go @@ -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 } diff --git a/infra/conf/v4/v2ray_test.go b/infra/conf/v4/v2ray_test.go index a8207bfd4..b516302e6 100644 --- a/infra/conf/v4/v2ray_test.go +++ b/infra/conf/v4/v2ray_test.go @@ -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)