diff --git a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go index ea0bca8836..6db326996a 100644 --- a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go +++ b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go @@ -247,14 +247,14 @@ func TestBranchProtectionRemediate(t *testing.T) { }, } - mockClient := mock_ghclient.NewMockGitHub(ctrl) - for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() + mockClient := mock_ghclient.NewMockGitHub(ctrl) + engine, err := NewGhBranchProtectRemediator(tt.newRemArgs.actionType, tt.newRemArgs.ghp, tt.newRemArgs.pbuild) if tt.wantInitErr { require.Error(t, err, "expected error")