diff options
Diffstat (limited to 'internal/handlers')
-rw-r--r-- | internal/handlers/handlers_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index aa664266..710a167c 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -79,6 +79,7 @@ func TestNotFoundWithTokenIsNotHandled(t *testing.T) { reqURL, _ := url.Parse("/") r := &http.Request{URL: reqURL} response := &http.Response{StatusCode: http.StatusNotFound} + // nolint:bodyclose // TODO investigate https://gitlab.com/gitlab-org/gitlab-pages/-/issues/606 handled := handlers.checkIfLoginRequiredOrInvalidToken(w, r, "token")(response) require.False(t, handled) @@ -97,6 +98,7 @@ func TestNotFoundWithoutTokenIsNotHandledWhenNotAuthSupport(t *testing.T) { reqURL, _ := url.Parse("/") r := &http.Request{URL: reqURL} response := &http.Response{StatusCode: http.StatusNotFound} + // nolint:bodyclose // TODO investigate https://gitlab.com/gitlab-org/gitlab-pages/-/issues/606 handled := handlers.checkIfLoginRequiredOrInvalidToken(w, r, "")(response) require.False(t, handled) @@ -115,6 +117,7 @@ func TestNotFoundWithoutTokenIsHandled(t *testing.T) { reqURL, _ := url.Parse("/") r := &http.Request{URL: reqURL} response := &http.Response{StatusCode: http.StatusNotFound} + // nolint:bodyclose // TODO investigate https://gitlab.com/gitlab-org/gitlab-pages/-/issues/606 handled := handlers.checkIfLoginRequiredOrInvalidToken(w, r, "")(response) require.True(t, handled) @@ -133,6 +136,7 @@ func TestInvalidTokenResponseIsHandled(t *testing.T) { reqURL, _ := url.Parse("/") r := &http.Request{URL: reqURL} response := &http.Response{StatusCode: http.StatusUnauthorized} + // nolint:bodyclose // TODO investigate https://gitlab.com/gitlab-org/gitlab-pages/-/issues/606 handled := handlers.checkIfLoginRequiredOrInvalidToken(w, r, "token")(response) require.True(t, handled) |