mirror of https://github.com/v2ray/v2ray-core
fix linux test
parent
027270fd2c
commit
fccf0c2edb
|
@ -4,6 +4,7 @@ package tcp_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
|
@ -23,6 +24,6 @@ func TestGetOriginalDestination(t *testing.T) {
|
||||||
assert.Error(err).IsNil()
|
assert.Error(err).IsNil()
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
||||||
_, err = GetOriginalDestination(conn)
|
originalDest, err := GetOriginalDestination(conn)
|
||||||
assert.String(err.Error()).Contains("failed to call getsockopt")
|
assert.Bool(dest == originalDest || strings.Contains(err.Error(), "failed to call getsockopt"))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue