Skip to content

Commit 05a64ad

Browse files
committed
Adjust tests to use the logger config option
1 parent 1b0ce40 commit 05a64ad

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

request_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import (
44
"bytes"
55
"encoding/binary"
66
"io"
7+
"log"
78
"net"
9+
"os"
810
"strings"
911
"testing"
1012
)
@@ -50,6 +52,7 @@ func TestRequest_Connect(t *testing.T) {
5052
s := &Server{config: &Config{
5153
Rules: PermitAll(),
5254
Resolver: DNSResolver{},
55+
Logger: log.New(os.Stdout, "", log.LstdFlags),
5356
}}
5457

5558
// Create the connect request
@@ -119,6 +122,7 @@ func TestRequest_Connect_RuleFail(t *testing.T) {
119122
s := &Server{config: &Config{
120123
Rules: PermitNone(),
121124
Resolver: DNSResolver{},
125+
Logger: log.New(os.Stdout, "", log.LstdFlags),
122126
}}
123127

124128
// Create the connect request

socks5_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import (
44
"bytes"
55
"encoding/binary"
66
"io"
7+
"log"
78
"net"
9+
"os"
810
"testing"
911
"time"
1012
)
@@ -38,9 +40,10 @@ func TestSOCKS5_Connect(t *testing.T) {
3840
creds := StaticCredentials{
3941
"foo": "bar",
4042
}
41-
cator := UserPassAuthenticator{Credentials : creds}
43+
cator := UserPassAuthenticator{Credentials: creds}
4244
conf := &Config{
43-
AuthMethods : []Authenticator{cator},
45+
AuthMethods: []Authenticator{cator},
46+
Logger: log.New(os.Stdout, "", log.LstdFlags),
4447
}
4548
serv, err := New(conf)
4649
if err != nil {

0 commit comments

Comments
 (0)