Adjust tests to use the logger config option
This commit is contained in:
parent
1b0ce4078f
commit
05a64adbf8
@ -4,7 +4,9 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"net"
|
"net"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -50,6 +52,7 @@ func TestRequest_Connect(t *testing.T) {
|
|||||||
s := &Server{config: &Config{
|
s := &Server{config: &Config{
|
||||||
Rules: PermitAll(),
|
Rules: PermitAll(),
|
||||||
Resolver: DNSResolver{},
|
Resolver: DNSResolver{},
|
||||||
|
Logger: log.New(os.Stdout, "", log.LstdFlags),
|
||||||
}}
|
}}
|
||||||
|
|
||||||
// Create the connect request
|
// Create the connect request
|
||||||
@ -119,6 +122,7 @@ func TestRequest_Connect_RuleFail(t *testing.T) {
|
|||||||
s := &Server{config: &Config{
|
s := &Server{config: &Config{
|
||||||
Rules: PermitNone(),
|
Rules: PermitNone(),
|
||||||
Resolver: DNSResolver{},
|
Resolver: DNSResolver{},
|
||||||
|
Logger: log.New(os.Stdout, "", log.LstdFlags),
|
||||||
}}
|
}}
|
||||||
|
|
||||||
// Create the connect request
|
// Create the connect request
|
||||||
|
@ -4,7 +4,9 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"net"
|
"net"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -41,6 +43,7 @@ func TestSOCKS5_Connect(t *testing.T) {
|
|||||||
cator := UserPassAuthenticator{Credentials: creds}
|
cator := UserPassAuthenticator{Credentials: creds}
|
||||||
conf := &Config{
|
conf := &Config{
|
||||||
AuthMethods: []Authenticator{cator},
|
AuthMethods: []Authenticator{cator},
|
||||||
|
Logger: log.New(os.Stdout, "", log.LstdFlags),
|
||||||
}
|
}
|
||||||
serv, err := New(conf)
|
serv, err := New(conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user