fix: docker test and golangci-lint

This commit is contained in:
yusing
2025-01-13 05:37:29 +08:00
parent 9a12dab600
commit ef277ef57f
4 changed files with 13 additions and 13 deletions

View File

@@ -10,7 +10,7 @@ import (
"golang.org/x/oauth2"
)
// setupMockOIDC configures mock OIDC provider for testing
// setupMockOIDC configures mock OIDC provider for testing.
func setupMockOIDC(t *testing.T) {
t.Helper()
@@ -68,7 +68,7 @@ func TestOIDCLoginHandler(t *testing.T) {
oauthConfig = nil
}
req := httptest.NewRequest("GET", "/login/oidc", nil)
req := httptest.NewRequest(http.MethodGet, "/login/oidc", nil)
w := httptest.NewRecorder()
OIDCLoginHandler(w, req)
@@ -143,7 +143,7 @@ func TestOIDCCallbackHandler(t *testing.T) {
oauthConfig = nil
}
req := httptest.NewRequest("GET", "/auth/callback?code="+tt.code+"&state="+tt.state, nil)
req := httptest.NewRequest(http.MethodGet, "/auth/callback?code="+tt.code+"&state="+tt.state, nil)
if tt.state != "" {
req.AddCookie(&http.Cookie{
Name: "oauth_state",