You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-01 22:51:45 +02:00
Auth and standard logging with file rolling
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pusher/oauth2_proxy/logger"
|
||||
)
|
||||
|
||||
func TestLoggingHandler_ServeHTTP(t *testing.T) {
|
||||
@@ -32,7 +34,9 @@ func TestLoggingHandler_ServeHTTP(t *testing.T) {
|
||||
w.Write([]byte("test"))
|
||||
}
|
||||
|
||||
h := LoggingHandler(buf, http.HandlerFunc(handler), true, test.Format)
|
||||
logger.SetOutput(buf)
|
||||
logger.SetReqTemplate(test.Format)
|
||||
h := LoggingHandler(http.HandlerFunc(handler))
|
||||
|
||||
r, _ := http.NewRequest("GET", "/foo/bar", nil)
|
||||
r.RemoteAddr = "127.0.0.1"
|
||||
|
||||
Reference in New Issue
Block a user