|
|
@ -17,7 +17,7 @@ import ( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
GithubLimitRateRemaining = 3 //Wait at 3 remaining since we could have 3 CI in //
|
|
|
|
GithubLimitRateRemaining = 3 // Wait at 3 remaining since we could have 3 CI in //
|
|
|
|
downloader := NewGithubDownloaderV3(context.Background(), "https://github.com", "", "", os.Getenv("GITHUB_READ_TOKEN"), "go-gitea", "test_repo") |
|
|
|
downloader := NewGithubDownloaderV3(context.Background(), "https://github.com", "", "", os.Getenv("GITHUB_READ_TOKEN"), "go-gitea", "test_repo") |
|
|
|
err := downloader.RefreshRate() |
|
|
|
err := downloader.RefreshRate() |
|
|
|
assert.NoError(t, err) |
|
|
|
assert.NoError(t, err) |
|
|
@ -364,7 +364,7 @@ func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
ReviewerID: 165205, |
|
|
|
ReviewerID: 165205, |
|
|
|
ReviewerName: "lafriks", |
|
|
|
ReviewerName: "lafriks", |
|
|
|
CommitID: "076160cf0b039f13e5eff19619932d181269414b", |
|
|
|
CommitID: "076160cf0b039f13e5eff19619932d181269414b", |
|
|
|
CreatedAt: time.Date(2019, 11, 12, 21, 38, 00, 0, time.UTC), |
|
|
|
CreatedAt: time.Date(2019, 11, 12, 21, 38, 0, 0, time.UTC), |
|
|
|
State: base.ReviewStateApproved, |
|
|
|
State: base.ReviewStateApproved, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, reviews) |
|
|
|
}, reviews) |
|
|
@ -378,7 +378,7 @@ func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
ReviewerID: 81045, |
|
|
|
ReviewerID: 81045, |
|
|
|
ReviewerName: "lunny", |
|
|
|
ReviewerName: "lunny", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CreatedAt: time.Date(2020, 01, 04, 05, 33, 18, 0, time.UTC), |
|
|
|
CreatedAt: time.Date(2020, 1, 4, 5, 33, 18, 0, time.UTC), |
|
|
|
State: base.ReviewStateApproved, |
|
|
|
State: base.ReviewStateApproved, |
|
|
|
Comments: []*base.ReviewComment{ |
|
|
|
Comments: []*base.ReviewComment{ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -389,8 +389,8 @@ func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
Position: 3, |
|
|
|
Position: 3, |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
PosterID: 81045, |
|
|
|
PosterID: 81045, |
|
|
|
CreatedAt: time.Date(2020, 01, 04, 05, 33, 06, 0, time.UTC), |
|
|
|
CreatedAt: time.Date(2020, 1, 4, 5, 33, 6, 0, time.UTC), |
|
|
|
UpdatedAt: time.Date(2020, 01, 04, 05, 33, 18, 0, time.UTC), |
|
|
|
UpdatedAt: time.Date(2020, 1, 4, 5, 33, 18, 0, time.UTC), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -400,7 +400,7 @@ func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
ReviewerID: 81045, |
|
|
|
ReviewerID: 81045, |
|
|
|
ReviewerName: "lunny", |
|
|
|
ReviewerName: "lunny", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CreatedAt: time.Date(2020, 01, 04, 06, 07, 06, 0, time.UTC), |
|
|
|
CreatedAt: time.Date(2020, 1, 4, 6, 7, 6, 0, time.UTC), |
|
|
|
State: base.ReviewStateChangesRequested, |
|
|
|
State: base.ReviewStateChangesRequested, |
|
|
|
Content: "Don't add more reviews", |
|
|
|
Content: "Don't add more reviews", |
|
|
|
}, |
|
|
|
}, |
|
|
@ -410,7 +410,7 @@ func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
ReviewerID: 81045, |
|
|
|
ReviewerID: 81045, |
|
|
|
ReviewerName: "lunny", |
|
|
|
ReviewerName: "lunny", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CreatedAt: time.Date(2020, 01, 04, 11, 21, 41, 0, time.UTC), |
|
|
|
CreatedAt: time.Date(2020, 1, 4, 11, 21, 41, 0, time.UTC), |
|
|
|
State: base.ReviewStateCommented, |
|
|
|
State: base.ReviewStateCommented, |
|
|
|
Comments: []*base.ReviewComment{ |
|
|
|
Comments: []*base.ReviewComment{ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -421,8 +421,8 @@ func TestGitHubDownloadRepo(t *testing.T) { |
|
|
|
Position: 4, |
|
|
|
Position: 4, |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
CommitID: "2be9101c543658591222acbee3eb799edfc3853d", |
|
|
|
PosterID: 81045, |
|
|
|
PosterID: 81045, |
|
|
|
CreatedAt: time.Date(2020, 01, 04, 11, 21, 41, 0, time.UTC), |
|
|
|
CreatedAt: time.Date(2020, 1, 4, 11, 21, 41, 0, time.UTC), |
|
|
|
UpdatedAt: time.Date(2020, 01, 04, 11, 21, 41, 0, time.UTC), |
|
|
|
UpdatedAt: time.Date(2020, 1, 4, 11, 21, 41, 0, time.UTC), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|