MCPcopy Create free account
hub / github.com/github/gh-aw / TestRunUpgradeForOrgNoReposFound

Function TestRunUpgradeForOrgNoReposFound

pkg/cli/upgrade_org_test.go:107–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func 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
122func TestRunUpgradeForOrgNoReposMatchFilter(t *testing.T) {
123 origSearch := searchOrgLockWorkflowReposFn

Callers

nothing calls this directly

Calls 3

captureUpgradeOrgStderrFunction · 0.85
runUpgradeForOrgFunction · 0.85
BackgroundMethod · 0.80

Tested by

no test coverage detected