Refactor integration test DecodeJSON calls to use generic return value (#37432)
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>
This commit is contained in:
@@ -218,8 +218,7 @@ func TestPackageConda(t *testing.T) {
|
||||
req := NewRequest(t, "GET", root+"/noarch/repodata.json")
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var result RepoData
|
||||
DecodeJSON(t, resp, &result)
|
||||
result := DecodeJSON(t, resp, &RepoData{})
|
||||
|
||||
assert.Equal(t, "noarch", result.Info.Subdir)
|
||||
assert.Empty(t, result.PackagesConda)
|
||||
@@ -251,8 +250,7 @@ func TestPackageConda(t *testing.T) {
|
||||
req := NewRequest(t, "GET", fmt.Sprintf("%s/%s/noarch/repodata.json", root, channel))
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var result RepoData
|
||||
DecodeJSON(t, resp, &result)
|
||||
result := DecodeJSON(t, resp, &RepoData{})
|
||||
|
||||
assert.Equal(t, "noarch", result.Info.Subdir)
|
||||
assert.Empty(t, result.Packages)
|
||||
|
||||
Reference in New Issue
Block a user