feat: update gitea vendor
runner nix smoke / nix label and flake smoke (push) Failing after 1m28s

This commit is contained in:
2026-09-26 21:18:24 +00:00
parent c439c1b948
commit d9b2a4e787
3538 changed files with 116131 additions and 44340 deletions
@@ -10,14 +10,14 @@ import (
"net/http"
"testing"
auth_model "code.gitea.io/gitea/models/auth"
issues_model "code.gitea.io/gitea/models/issues"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/services/convert"
"code.gitea.io/gitea/tests"
auth_model "gitea.dev/models/auth"
issues_model "gitea.dev/models/issues"
repo_model "gitea.dev/models/repo"
"gitea.dev/models/unittest"
user_model "gitea.dev/models/user"
api "gitea.dev/modules/structs"
"gitea.dev/services/convert"
"gitea.dev/tests"
"github.com/stretchr/testify/assert"
)
@@ -50,8 +50,7 @@ func TestAPIGetCommentAttachment(t *testing.T) {
AddTokenAuth(token)
resp := session.MakeRequest(t, req, http.StatusOK)
var apiAttachment api.Attachment
DecodeJSON(t, resp, &apiAttachment)
apiAttachment := DecodeJSON(t, resp, &api.Attachment{})
expect := convert.ToAPIAttachment(repo, attachment)
assert.Equal(t, expect.ID, apiAttachment.ID)
@@ -75,8 +74,7 @@ func TestAPIListCommentAttachments(t *testing.T) {
AddTokenAuth(token)
resp := session.MakeRequest(t, req, http.StatusOK)
var apiAttachments []*api.Attachment
DecodeJSON(t, resp, &apiAttachments)
apiAttachments := DecodeJSON(t, resp, []*api.Attachment{})
expectedCount := unittest.GetCount(t, &repo_model.Attachment{CommentID: comment.ID})
assert.Len(t, apiAttachments, expectedCount)
@@ -110,9 +108,7 @@ func TestAPICreateCommentAttachment(t *testing.T) {
SetHeader("Content-Type", writer.FormDataContentType())
resp := session.MakeRequest(t, req, http.StatusCreated)
apiAttachment := new(api.Attachment)
DecodeJSON(t, resp, &apiAttachment)
apiAttachment := DecodeJSON(t, resp, &api.Attachment{})
unittest.AssertExistsAndLoadBean(t, &repo_model.Attachment{ID: apiAttachment.ID, CommentID: comment.ID})
}
@@ -163,9 +159,7 @@ func TestAPIEditCommentAttachment(t *testing.T) {
"name": newAttachmentName,
}).AddTokenAuth(token)
resp := session.MakeRequest(t, req, http.StatusCreated)
apiAttachment := new(api.Attachment)
DecodeJSON(t, resp, &apiAttachment)
apiAttachment := DecodeJSON(t, resp, &api.Attachment{})
unittest.AssertExistsAndLoadBean(t, &repo_model.Attachment{ID: apiAttachment.ID, CommentID: comment.ID, Name: apiAttachment.Name})
}