tests/integration: simplify code (#37249)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
Copilot
2026-04-17 20:33:49 +08:00
committed by GitHub
parent dc974715e9
commit eb334e3738
23 changed files with 168 additions and 279 deletions
+1 -2
View File
@@ -86,8 +86,7 @@ func TestAPIRepoTopic(t *testing.T) {
req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/topics", user2.Name, repo2.Name)).
AddTokenAuth(token2)
res := MakeRequest(t, req, http.StatusOK)
var topics *api.TopicName
DecodeJSON(t, res, &topics)
topics := DecodeJSON(t, res, &api.TopicName{})
assert.ElementsMatch(t, []string{"topicname1", "topicname2"}, topics.TopicNames)
// Test delete a topic