(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestRunUpgradeForOrgNoReposFound(t *testing.T) { |
| 108 | origSearch := searchOrgLockWorkflowReposFn |
| 109 | searchOrgLockWorkflowReposFn = func(ctx context.Context, org string, verbose bool) ([]string, error) { |
| 110 | return nil, nil |
| 111 | } |
| 112 | defer func() { searchOrgLockWorkflowReposFn = origSearch }() |
| 113 | |
| 114 | output := captureUpgradeOrgStderr(t, func() { |
| 115 | err := runUpgradeForOrg(context.Background(), "octo", nil, upgradeOptions{ctx: context.Background()}, false, false, false) |
| 116 | require.NoError(t, err) |
| 117 | }) |
| 118 | |
| 119 | assert.Contains(t, output, "No repositories found with agentic workflows") |
| 120 | } |
| 121 | |
| 122 | func TestRunUpgradeForOrgNoReposMatchFilter(t *testing.T) { |
| 123 | origSearch := searchOrgLockWorkflowReposFn |
nothing calls this directly
no test coverage detected