* Fix #7136: Add paging and extend API GetCommitStatuses * update swagger * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Apply suggestions from code review
This commit is contained in:
parent
5efd3630bc
commit
734aa96508
4 changed files with 138 additions and 9 deletions
|
@ -17,8 +17,9 @@ func TestGetCommitStatuses(t *testing.T) {
|
|||
|
||||
sha1 := "1234123412341234123412341234123412341234"
|
||||
|
||||
statuses, err := GetCommitStatuses(repo1, sha1, 0)
|
||||
statuses, maxResults, err := GetCommitStatuses(repo1, sha1, &CommitStatusOptions{})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, int(maxResults), 5)
|
||||
if assert.Len(t, statuses, 5) {
|
||||
assert.Equal(t, statuses[0].Context, "ci/awesomeness")
|
||||
assert.Equal(t, statuses[0].State, CommitStatusPending)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue