1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-30 07:46:41 -04:00

fix test break

This commit is contained in:
Darien Raymond 2017-04-18 12:12:17 +02:00
parent 40f890e638
commit 3cb60fac90
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -8,20 +8,20 @@ import (
"v2ray.com/core/testing/assert"
"v2ray.com/core/testing/servers/tcp"
. "v2ray.com/core/transport/internet/tcp"
)
func TestGetOriginalDestination(t *testing.T) {
assert := assert.On(t)
tcpServer := tcp.Server{
MsgProcessor: xor,
}
tcpServer := tcp.Server{}
dest, err := tcpServer.Start()
assert.Error(err).IsNil()
defer tcpServer.Close()
conn, err := Dial(context.Background(), dest)
assert.Error(err).IsNil()
defer conn.Close()
_, err := GetOriginalDestination(conn)
assert.String(err.Error()).Contains("failed to call getsockopt")