simplify testing

This commit is contained in:
v2ray committed 2016-05-24 21:55:46 +02:00
1 parent 3582b9d869
commit fc63f0432c
99 files changed
+726 -817

No files matched your search

+3 -4
View File
@@ -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())