Skip to content

Commit d58fe46

Browse files
committed
Fix some tests
The tests which use the releases package were failing because we have had more than 50 non-prerelease releases since the last consensus release, and it was only fetching the first 50 pages from the GitHub API.
1 parent 76380bd commit d58fe46

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

util/testhelpers/github/releases.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func getAuthGitClient(ctx context.Context) *github.Client {
3333
func NitroReleases(ctx context.Context) ([]*github.RepositoryRelease, error) {
3434
client := getAuthGitClient(ctx)
3535
opts := &github.ListOptions{
36-
PerPage: 50,
36+
PerPage: 100,
3737
}
3838
releases, _, err := client.Repositories.ListReleases(ctx, "OffchainLabs", "nitro", opts)
3939
return releases, err

util/testhelpers/github/releases_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func TestReleases(t *testing.T) {
1313
if len(rels) == 0 {
1414
t.Error("No releases found")
1515
}
16-
if len(rels) != 50 {
17-
t.Errorf("Expected 50 releases, got %d", len(rels))
16+
if len(rels) != 100 {
17+
t.Errorf("Expected 100 releases, got %d", len(rels))
1818
}
1919
}
2020

0 commit comments

Comments
 (0)