diff --git a/workflow-pr/pr_processor_opened_test.go b/workflow-pr/pr_processor_opened_test.go index 3190f94..9bec971 100644 --- a/workflow-pr/pr_processor_opened_test.go +++ b/workflow-pr/pr_processor_opened_test.go @@ -106,6 +106,7 @@ func TestOpenPR(t *testing.T) { gitea.EXPECT().CreatePullRequestIfNotExist(prjgit, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(giteaPR, nil) gitea.EXPECT().GetPullRequest("test", "testRepo", int64(1)).Return(giteaPR, nil) gitea.EXPECT().RequestReviews(giteaPR, "reviewer1", "reviewer2").Return(nil, nil) + gitea.EXPECT().GetPullRequestReviews("test", "testRepo", int64(0)).Return([]*models.PullReview{}, nil) gitea.EXPECT().FetchMaintainershipDirFile("test", "prjcopy", "branch", "_project").Return(nil, repository.NewRepoGetRawFileNotFound()) gitea.EXPECT().FetchMaintainershipFile("test", "prjcopy", "branch").Return(nil, repository.NewRepoGetRawFileNotFound()) @@ -191,6 +192,7 @@ func TestOpenPR(t *testing.T) { gitea.EXPECT().GetAssociatedPrjGitPR("test", "prjcopy", "test", "testRepo", int64(1)).Return(nil, nil) gitea.EXPECT().CreateRepositoryIfNotExist(git, "test", "prjcopy").Return(prjgit, nil) gitea.EXPECT().GetPullRequest("test", "testRepo", int64(1)).Return(giteaPR, nil) + gitea.EXPECT().GetPullRequestReviews("org", "SomeRepo", int64(13)).Return([]*models.PullReview{}, nil) gitea.EXPECT().CreatePullRequestIfNotExist(prjgit, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(giteaPR, nil) gitea.EXPECT().RequestReviews(giteaPR, "reviewer1", "reviewer2").Return(nil, failedErr)