mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-06 03:54:22 -04:00
20 lines
486 B
Go
20 lines
486 B
Go
|
package dialer_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||
|
v2testing "github.com/v2ray/v2ray-core/testing"
|
||
|
"github.com/v2ray/v2ray-core/testing/assert"
|
||
|
. "github.com/v2ray/v2ray-core/transport/dialer"
|
||
|
)
|
||
|
|
||
|
func TestDialDomain(t *testing.T) {
|
||
|
v2testing.Current(t)
|
||
|
|
||
|
conn, err := Dial(v2net.TCPDestination(v2net.DomainAddress("google.com"), 443))
|
||
|
assert.Error(err).IsNil()
|
||
|
assert.StringLiteral(conn.RemoteAddr().Network()).Equals("tcp")
|
||
|
conn.Close()
|
||
|
}
|