From 05a64adbf84cd7f3ed20317b9f94472f1d6141bf Mon Sep 17 00:00:00 2001 From: svent Date: Mon, 7 Sep 2015 02:19:34 +0200 Subject: [PATCH] Adjust tests to use the logger config option --- request_test.go | 4 ++++ socks5_test.go | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/request_test.go b/request_test.go index ce1db9d..880a3cd 100644 --- a/request_test.go +++ b/request_test.go @@ -4,7 +4,9 @@ import ( "bytes" "encoding/binary" "io" + "log" "net" + "os" "strings" "testing" ) @@ -50,6 +52,7 @@ func TestRequest_Connect(t *testing.T) { s := &Server{config: &Config{ Rules: PermitAll(), Resolver: DNSResolver{}, + Logger: log.New(os.Stdout, "", log.LstdFlags), }} // Create the connect request @@ -119,6 +122,7 @@ func TestRequest_Connect_RuleFail(t *testing.T) { s := &Server{config: &Config{ Rules: PermitNone(), Resolver: DNSResolver{}, + Logger: log.New(os.Stdout, "", log.LstdFlags), }} // Create the connect request diff --git a/socks5_test.go b/socks5_test.go index f78fc88..c7d6e26 100644 --- a/socks5_test.go +++ b/socks5_test.go @@ -4,7 +4,9 @@ import ( "bytes" "encoding/binary" "io" + "log" "net" + "os" "testing" "time" ) @@ -38,9 +40,10 @@ func TestSOCKS5_Connect(t *testing.T) { creds := StaticCredentials{ "foo": "bar", } - cator := UserPassAuthenticator{Credentials : creds} + cator := UserPassAuthenticator{Credentials: creds} conf := &Config{ - AuthMethods : []Authenticator{cator}, + AuthMethods: []Authenticator{cator}, + Logger: log.New(os.Stdout, "", log.LstdFlags), } serv, err := New(conf) if err != nil {