mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-28 03:45:26 -05:00
refactor app.Space
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/v2ray/v2ray-core/app"
|
||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
||||
"github.com/v2ray/v2ray-core/common/uuid"
|
||||
@@ -38,7 +39,7 @@ func TestVMessInAndOut(t *testing.T) {
|
||||
}
|
||||
|
||||
protocol, err := proxytesting.RegisterInboundConnectionHandlerCreator("mock_och", func(space app.Space, config interface{}) (proxy.InboundHandler, error) {
|
||||
ich.Space = space
|
||||
ich.PacketDispatcher = space.GetApp(dispatcher.APP_ID).(dispatcher.PacketDispatcher)
|
||||
return ich, nil
|
||||
})
|
||||
assert.Error(err).IsNil()
|
||||
|
||||
Reference in New Issue
Block a user