1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-03 07:56:42 -05:00

fix linux test

This commit is contained in:
Darien Raymond 2017-04-19 11:52:17 +02:00
parent 027270fd2c
commit fccf0c2edb
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -4,6 +4,7 @@ package tcp_test
import (
"context"
"strings"
"testing"
"v2ray.com/core/testing/assert"
@ -23,6 +24,6 @@ func TestGetOriginalDestination(t *testing.T) {
assert.Error(err).IsNil()
defer conn.Close()
_, err = GetOriginalDestination(conn)
assert.String(err.Error()).Contains("failed to call getsockopt")
originalDest, err := GetOriginalDestination(conn)
assert.Bool(dest == originalDest || strings.Contains(err.Error(), "failed to call getsockopt"))
}