From 9d6588ed4f9bc4874360d2dd8c1d0f135fd1a7c4 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 25 Jan 2025 18:57:09 -0800 Subject: [PATCH] Fix test --- tests/integration/api_pull_review_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/api_pull_review_test.go b/tests/integration/api_pull_review_test.go index c1a5e21389d..b2cce3dd302 100644 --- a/tests/integration/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -391,6 +391,9 @@ func TestAPIPullReviewStayDismissed(t *testing.T) { session8 := loginUser(t, user8.LoginName) token8 := getTokenForLoggedInUser(t, session8, auth_model.AccessTokenScopeWriteRepository) + // add user8 as collaborator of repo 1 otherwise he can't be as reviewer + assert.NoError(t, repo_service.AddOrUpdateCollaborator(db.DefaultContext, repo, user8, perm.AccessModeRead)) + // user2 request user8 req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/requested_reviewers", repo.OwnerName, repo.Name, pullIssue.Index), &api.PullReviewRequestOptions{ Reviewers: []string{user8.LoginName},