mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-03 00:22:05 +00:00
simplify testing
This commit is contained in:
1 parent
3582b9d869
commit
fc63f0432c
99 files changed
+726
-817
No files matched your search
@@ -15,14 +15,13 @@ import (
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
||||
. "github.com/v2ray/v2ray-core/proxy/freedom"
|
||||
v2testing "github.com/v2ray/v2ray-core/testing"
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
"github.com/v2ray/v2ray-core/testing/servers/tcp"
|
||||
"github.com/v2ray/v2ray-core/transport/ray"
|
||||
)
|
||||
|
||||
func TestSinglePacket(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
assert := assert.On(t)
|
||||
port := v2nettesting.PickPort()
|
||||
|
||||
tcpServer := &tcp.Server{
|
||||
@@ -56,7 +55,7 @@ func TestSinglePacket(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUnreachableDestination(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
assert := assert.On(t)
|
||||
|
||||
freedom := NewFreedomConnection(&Config{}, app.NewSpace())
|
||||
traffic := ray.NewRay()
|
||||
@@ -68,7 +67,7 @@ func TestUnreachableDestination(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIPResolution(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
assert := assert.On(t)
|
||||
|
||||
space := app.NewSpace()
|
||||
space.BindApp(proxyman.APP_ID_OUTBOUND_MANAGER, proxyman.NewDefaultOutboundHandlerManager())
|
||||
|
||||
Reference in new issue
Block a user