1
0
Fork 0

Adjust tests to use the logger config option

logger
svent 2015-09-07 02:19:34 +02:00
parent 1b0ce4078f
commit 05a64adbf8
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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 {