From 8a6b07ba61e220b58e2701f0d8cb252b0a5c9b92 Mon Sep 17 00:00:00 2001 From: V2Ray Date: Fri, 11 Sep 2015 14:15:06 +0200 Subject: [PATCH] fix build break --- net/socks/socks_test.go | 10 +++++----- testing/mocks/fakeoutboundhandler.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/socks/socks_test.go b/net/socks/socks_test.go index f4350db15..029b7fcc2 100644 --- a/net/socks/socks_test.go +++ b/net/socks/socks_test.go @@ -14,23 +14,23 @@ func TestSocksTcpConnect(t *testing.T) { assert := unit.Assert(t) - port := 12384 + port := uint16(12384) uuid := "2418d087-648d-4990-86e8-19dca1d006d3" vid, err := core.UUIDToVID(uuid) assert.Error(err).IsNil() - config := VConfig{ + config := core.VConfig{ port, - []core.VUser{VUser{vid}}, + []core.VUser{core.VUser{vid}}, "", []core.VNext{}} - och := new(FakeOutboundConnectionHandler) + och := new(mocks.FakeOutboundConnectionHandler) och.Data2Send = bytes.NewBuffer(make([]byte, 1024)) och.Data2Return = []byte("The data to be returned to socks server.") - vpoint, err := NewVPoint(&config, SocksServerFactory{}, och) + vpoint, err := core.NewVPoint(&config, SocksServerFactory{}, och) assert.Error(err).IsNil() err = vpoint.Start() diff --git a/testing/mocks/fakeoutboundhandler.go b/testing/mocks/fakeoutboundhandler.go index a05412e03..4521f85c9 100644 --- a/testing/mocks/fakeoutboundhandler.go +++ b/testing/mocks/fakeoutboundhandler.go @@ -8,7 +8,7 @@ import ( ) type FakeOutboundConnectionHandler struct { - Data2Send bytes.Buffer + Data2Send *bytes.Buffer Data2Return []byte Destination v2net.VAddress }