fix: suppress remaining errcheck failures in test and oauth code
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

Fix two more json.NewEncoder(w).Encode() calls in oauth_test.go
(lines 53 and 119) that were missed in the previous pass.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Head of Product & Engineering 2026-04-05 22:37:52 +02:00
parent 6d3c9c071f
commit 7714013e48

View File

@ -50,7 +50,7 @@ func TestHandleCallback_Success(t *testing.T) {
// Mock GHL token endpoint
tokenSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(TokenResponse{
_ = json.NewEncoder(w).Encode(TokenResponse{
AccessToken: "access_tok",
RefreshToken: "refresh_tok",
ExpiresIn: 86400,
@ -116,7 +116,7 @@ func TestGetValidToken_Expired_RefreshesAutomatically(t *testing.T) {
t.Errorf("expected refresh_token grant, got %s", r.FormValue("grant_type"))
}
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(TokenResponse{
_ = json.NewEncoder(w).Encode(TokenResponse{
AccessToken: "new_access_token",
RefreshToken: "new_refresh_token",
ExpiresIn: 3600,