Skip to content

Commit 252081f

Browse files
Update test mock expectations from per_page=30 to per_page=11
Co-authored-by: SamMorrowDrums <[email protected]>
1 parent 8e532ae commit 252081f

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

pkg/github/issues_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func Test_SearchIssues(t *testing.T) {
307307
"sort": "created",
308308
"order": "desc",
309309
"page": "1",
310-
"per_page": "30",
310+
"per_page": "11",
311311
},
312312
).andThen(
313313
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -336,7 +336,7 @@ func Test_SearchIssues(t *testing.T) {
336336
"sort": "created",
337337
"order": "asc",
338338
"page": "1",
339-
"per_page": "30",
339+
"per_page": "11",
340340
},
341341
).andThen(
342342
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -363,7 +363,7 @@ func Test_SearchIssues(t *testing.T) {
363363
map[string]string{
364364
"q": "is:issue bug",
365365
"page": "1",
366-
"per_page": "30",
366+
"per_page": "11",
367367
},
368368
).andThen(
369369
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -387,7 +387,7 @@ func Test_SearchIssues(t *testing.T) {
387387
map[string]string{
388388
"q": "is:issue feature",
389389
"page": "1",
390-
"per_page": "30",
390+
"per_page": "11",
391391
},
392392
).andThen(
393393
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -425,7 +425,7 @@ func Test_SearchIssues(t *testing.T) {
425425
map[string]string{
426426
"q": "repo:github/github-mcp-server is:issue is:open (label:critical OR label:urgent)",
427427
"page": "1",
428-
"per_page": "30",
428+
"per_page": "11",
429429
},
430430
).andThen(
431431
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -448,7 +448,7 @@ func Test_SearchIssues(t *testing.T) {
448448
map[string]string{
449449
"q": "is:issue repo:github/github-mcp-server critical",
450450
"page": "1",
451-
"per_page": "30",
451+
"per_page": "11",
452452
},
453453
).andThen(
454454
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -473,7 +473,7 @@ func Test_SearchIssues(t *testing.T) {
473473
map[string]string{
474474
"q": "is:issue repo:octocat/Hello-World bug",
475475
"page": "1",
476-
"per_page": "30",
476+
"per_page": "11",
477477
},
478478
).andThen(
479479
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -496,7 +496,7 @@ func Test_SearchIssues(t *testing.T) {
496496
map[string]string{
497497
"q": "repo:github/github-mcp-server is:issue (label:critical OR label:urgent OR label:high-priority OR label:blocker)",
498498
"page": "1",
499-
"per_page": "30",
499+
"per_page": "11",
500500
},
501501
).andThen(
502502
mockResponse(t, http.StatusOK, mockSearchResult),

pkg/github/pullrequests_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ func Test_SearchPullRequests(t *testing.T) {
892892
"sort": "created",
893893
"order": "desc",
894894
"page": "1",
895-
"per_page": "30",
895+
"per_page": "11",
896896
},
897897
).andThen(
898898
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -921,7 +921,7 @@ func Test_SearchPullRequests(t *testing.T) {
921921
"sort": "updated",
922922
"order": "asc",
923923
"page": "1",
924-
"per_page": "30",
924+
"per_page": "11",
925925
},
926926
).andThen(
927927
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -948,7 +948,7 @@ func Test_SearchPullRequests(t *testing.T) {
948948
map[string]string{
949949
"q": "is:pr feature",
950950
"page": "1",
951-
"per_page": "30",
951+
"per_page": "11",
952952
},
953953
).andThen(
954954
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -972,7 +972,7 @@ func Test_SearchPullRequests(t *testing.T) {
972972
map[string]string{
973973
"q": "is:pr review-required",
974974
"page": "1",
975-
"per_page": "30",
975+
"per_page": "11",
976976
},
977977
).andThen(
978978
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -1010,7 +1010,7 @@ func Test_SearchPullRequests(t *testing.T) {
10101010
map[string]string{
10111011
"q": "is:pr repo:github/github-mcp-server is:open draft:false",
10121012
"page": "1",
1013-
"per_page": "30",
1013+
"per_page": "11",
10141014
},
10151015
).andThen(
10161016
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -1033,7 +1033,7 @@ func Test_SearchPullRequests(t *testing.T) {
10331033
map[string]string{
10341034
"q": "is:pr repo:github/github-mcp-server author:octocat",
10351035
"page": "1",
1036-
"per_page": "30",
1036+
"per_page": "11",
10371037
},
10381038
).andThen(
10391039
mockResponse(t, http.StatusOK, mockSearchResult),
@@ -1058,7 +1058,7 @@ func Test_SearchPullRequests(t *testing.T) {
10581058
map[string]string{
10591059
"q": "is:pr repo:github/github-mcp-server (label:bug OR label:enhancement OR label:feature)",
10601060
"page": "1",
1061-
"per_page": "30",
1061+
"per_page": "11",
10621062
},
10631063
).andThen(
10641064
mockResponse(t, http.StatusOK, mockSearchResult),

pkg/github/repositories_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ func Test_ListCommits(t *testing.T) {
882882
"author": "username",
883883
"sha": "main",
884884
"page": "1",
885-
"per_page": "30",
885+
"per_page": "11",
886886
}).andThen(
887887
mockResponse(t, http.StatusOK, mockCommits),
888888
),

pkg/github/search_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func Test_SearchRepositories(t *testing.T) {
9494
expectQueryParams(t, map[string]string{
9595
"q": "golang test",
9696
"page": "1",
97-
"per_page": "30",
97+
"per_page": "11",
9898
}).andThen(
9999
mockResponse(t, http.StatusOK, mockSearchResult),
100100
),
@@ -199,7 +199,7 @@ func Test_SearchRepositories_FullOutput(t *testing.T) {
199199
expectQueryParams(t, map[string]string{
200200
"q": "golang test",
201201
"page": "1",
202-
"per_page": "30",
202+
"per_page": "11",
203203
}).andThen(
204204
mockResponse(t, http.StatusOK, mockSearchResult),
205205
),
@@ -296,7 +296,7 @@ func Test_SearchCode(t *testing.T) {
296296
"sort": "indexed",
297297
"order": "desc",
298298
"page": "1",
299-
"per_page": "30",
299+
"per_page": "11",
300300
}).andThen(
301301
mockResponse(t, http.StatusOK, mockSearchResult),
302302
),
@@ -320,7 +320,7 @@ func Test_SearchCode(t *testing.T) {
320320
expectQueryParams(t, map[string]string{
321321
"q": "fmt.Println language:go",
322322
"page": "1",
323-
"per_page": "30",
323+
"per_page": "11",
324324
}).andThen(
325325
mockResponse(t, http.StatusOK, mockSearchResult),
326326
),
@@ -456,7 +456,7 @@ func Test_SearchUsers(t *testing.T) {
456456
"sort": "followers",
457457
"order": "desc",
458458
"page": "1",
459-
"per_page": "30",
459+
"per_page": "11",
460460
}).andThen(
461461
mockResponse(t, http.StatusOK, mockSearchResult),
462462
),
@@ -480,7 +480,7 @@ func Test_SearchUsers(t *testing.T) {
480480
expectQueryParams(t, map[string]string{
481481
"q": "type:user location:finland language:go",
482482
"page": "1",
483-
"per_page": "30",
483+
"per_page": "11",
484484
}).andThen(
485485
mockResponse(t, http.StatusOK, mockSearchResult),
486486
),
@@ -500,7 +500,7 @@ func Test_SearchUsers(t *testing.T) {
500500
expectQueryParams(t, map[string]string{
501501
"q": "type:user location:seattle followers:>100",
502502
"page": "1",
503-
"per_page": "30",
503+
"per_page": "11",
504504
}).andThen(
505505
mockResponse(t, http.StatusOK, mockSearchResult),
506506
),
@@ -520,7 +520,7 @@ func Test_SearchUsers(t *testing.T) {
520520
expectQueryParams(t, map[string]string{
521521
"q": "type:user (location:seattle OR location:california) followers:>50",
522522
"page": "1",
523-
"per_page": "30",
523+
"per_page": "11",
524524
}).andThen(
525525
mockResponse(t, http.StatusOK, mockSearchResult),
526526
),
@@ -653,7 +653,7 @@ func Test_SearchOrgs(t *testing.T) {
653653
expectQueryParams(t, map[string]string{
654654
"q": "type:org github",
655655
"page": "1",
656-
"per_page": "30",
656+
"per_page": "11",
657657
}).andThen(
658658
mockResponse(t, http.StatusOK, mockSearchResult),
659659
),
@@ -673,7 +673,7 @@ func Test_SearchOrgs(t *testing.T) {
673673
expectQueryParams(t, map[string]string{
674674
"q": "type:org location:california followers:>1000",
675675
"page": "1",
676-
"per_page": "30",
676+
"per_page": "11",
677677
}).andThen(
678678
mockResponse(t, http.StatusOK, mockSearchResult),
679679
),
@@ -693,7 +693,7 @@ func Test_SearchOrgs(t *testing.T) {
693693
expectQueryParams(t, map[string]string{
694694
"q": "type:org (location:seattle OR location:california OR location:newyork) repos:>10",
695695
"page": "1",
696-
"per_page": "30",
696+
"per_page": "11",
697697
}).andThen(
698698
mockResponse(t, http.StatusOK, mockSearchResult),
699699
),

0 commit comments

Comments
 (0)