1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

formatting and extra test

Can probably slim down the `ExcludePath` tests.
This commit is contained in:
Karl Skewes
2019-06-03 10:04:15 +12:00
parent c4f20fff3d
commit 08021429ea
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ func TestLoggingHandler_ServeHTTP(t *testing.T) {
{logger.DefaultRequestLoggingFormat, fmt.Sprintf("127.0.0.1 - - [%s] test-server GET - \"/foo/bar\" HTTP/1.1 \"\" 200 4 0.000\n", logger.FormatTimestamp(ts)), "/foo/bar", ""},
{logger.DefaultRequestLoggingFormat, fmt.Sprintf("127.0.0.1 - - [%s] test-server GET - \"/foo/bar\" HTTP/1.1 \"\" 200 4 0.000\n", logger.FormatTimestamp(ts)), "/foo/bar", "/ping"},
{logger.DefaultRequestLoggingFormat, fmt.Sprintf("127.0.0.1 - - [%s] test-server GET - \"/ping\" HTTP/1.1 \"\" 200 4 0.000\n", logger.FormatTimestamp(ts)), "/ping", ""},
{logger.DefaultRequestLoggingFormat, "", "/ping", "/ping"},
{"{{.RequestMethod}}", "GET\n", "/foo/bar", ""},
{"{{.RequestMethod}}", "GET\n", "/foo/bar", "/ping"},
{"{{.RequestMethod}}", "GET\n", "/ping", ""},