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
@@ -9,14 +9,14 @@ import (
"testing"
"time"
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"
)
@@ -51,8 +51,7 @@ func TestAPIIssuesReactions(t *testing.T) {
Reaction: "rocket",
}).AddTokenAuth(token)
resp := MakeRequest(t, req, http.StatusCreated)
var apiNewReaction api.Reaction
DecodeJSON(t, resp, &apiNewReaction)
apiNewReaction := DecodeJSON(t, resp, &api.Reaction{})
// Add existing reaction
req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
@@ -71,15 +70,14 @@ func TestAPIIssuesReactions(t *testing.T) {
req = NewRequest(t, "GET", urlStr).
AddTokenAuth(token)
resp = MakeRequest(t, req, http.StatusOK)
var apiReactions []*api.Reaction
DecodeJSON(t, resp, &apiReactions)
apiReactions := DecodeJSON(t, resp, []*api.Reaction{})
expectResponse := make(map[int]api.Reaction)
expectResponse[0] = api.Reaction{
User: convert.ToUser(t.Context(), user2, user2),
Reaction: "eyes",
Created: time.Unix(1573248003, 0),
}
expectResponse[1] = apiNewReaction
expectResponse[1] = *apiNewReaction
assert.Len(t, apiReactions, 2)
for i, r := range apiReactions {
assert.Equal(t, expectResponse[i].Reaction, r.Reaction)
@@ -141,8 +139,7 @@ func TestAPICommentReactions(t *testing.T) {
Reaction: "+1",
}).AddTokenAuth(token)
resp := MakeRequest(t, req, http.StatusCreated)
var apiNewReaction api.Reaction
DecodeJSON(t, resp, &apiNewReaction)
apiNewReaction := DecodeJSON(t, resp, &api.Reaction{})
// Add existing reaction
req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
@@ -154,8 +151,7 @@ func TestAPICommentReactions(t *testing.T) {
req = NewRequest(t, "GET", urlStr).
AddTokenAuth(token)
resp = MakeRequest(t, req, http.StatusOK)
var apiReactions []*api.Reaction
DecodeJSON(t, resp, &apiReactions)
apiReactions := DecodeJSON(t, resp, []*api.Reaction{})
expectResponse := make(map[int]api.Reaction)
expectResponse[0] = api.Reaction{
User: convert.ToUser(t.Context(), user2, user2),
@@ -167,7 +163,7 @@ func TestAPICommentReactions(t *testing.T) {
Reaction: "laugh",
Created: time.Unix(1573248005, 0),
}
expectResponse[2] = apiNewReaction
expectResponse[2] = *apiNewReaction
assert.Len(t, apiReactions, 3)
for i, r := range apiReactions {
assert.Equal(t, expectResponse[i].Reaction, r.Reaction)