| 30 | } |
| 31 | |
| 32 | func TestGranularToolSnaps(t *testing.T) { |
| 33 | // Test toolsnaps for all granular tools |
| 34 | toolConstructors := []func(translations.TranslationHelperFunc) inventory.ServerTool{ |
| 35 | GranularCreateIssue, |
| 36 | GranularUpdateIssueTitle, |
| 37 | GranularUpdateIssueBody, |
| 38 | GranularUpdateIssueAssignees, |
| 39 | GranularUpdateIssueLabels, |
| 40 | GranularUpdateIssueMilestone, |
| 41 | GranularUpdateIssueType, |
| 42 | GranularUpdateIssueState, |
| 43 | GranularAddSubIssue, |
| 44 | GranularRemoveSubIssue, |
| 45 | GranularReprioritizeSubIssue, |
| 46 | GranularSetIssueFields, |
| 47 | GranularAddIssueReaction, |
| 48 | GranularAddIssueCommentReaction, |
| 49 | GranularUpdatePullRequestTitle, |
| 50 | GranularUpdatePullRequestBody, |
| 51 | GranularUpdatePullRequestState, |
| 52 | GranularUpdatePullRequestDraftState, |
| 53 | GranularRequestPullRequestReviewers, |
| 54 | GranularCreatePullRequestReview, |
| 55 | GranularSubmitPendingPullRequestReview, |
| 56 | GranularDeletePendingPullRequestReview, |
| 57 | GranularAddPullRequestReviewComment, |
| 58 | GranularResolveReviewThread, |
| 59 | GranularUnresolveReviewThread, |
| 60 | GranularAddPullRequestReviewCommentReaction, |
| 61 | } |
| 62 | |
| 63 | for _, constructor := range toolConstructors { |
| 64 | serverTool := constructor(translations.NullTranslationHelper) |
| 65 | t.Run(serverTool.Tool.Name, func(t *testing.T) { |
| 66 | require.NoError(t, toolsnaps.Test(serverTool.Tool.Name, serverTool.Tool)) |
| 67 | }) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func TestIssuesGranularToolset(t *testing.T) { |
| 72 | t.Run("toolset contains expected granular tools", func(t *testing.T) { |