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:
parent
027270fd2c
commit
fccf0c2edb
@ -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"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user