1
0
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:
MisterWil
2019-02-10 08:37:45 -08:00
parent ee4ebe53bf
commit 8ec025f536
23 changed files with 799 additions and 200 deletions

View File

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