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:
@@ -74,8 +74,7 @@ func checkRepoLicense(t *testing.T, owner, repo string, expected []string) {
|
||||
req := NewRequest(t, "GET", reqURL)
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var licenses []string
|
||||
DecodeJSON(t, resp, &licenses)
|
||||
licenses := DecodeJSON(t, resp, []string{})
|
||||
|
||||
assert.ElementsMatch(t, expected, licenses, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user