From fccf0c2edb54fbda454f19076a8e5ec54b245ca8 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 19 Apr 2017 11:52:17 +0200 Subject: [PATCH] fix linux test --- transport/internet/tcp/sockopt_linux_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transport/internet/tcp/sockopt_linux_test.go b/transport/internet/tcp/sockopt_linux_test.go index a92b746bb..34e430d8d 100644 --- a/transport/internet/tcp/sockopt_linux_test.go +++ b/transport/internet/tcp/sockopt_linux_test.go @@ -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")) }