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

Function TestRunUpgradeForOrgCreatePRRequiresYesInCI

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

Source from the content-addressed store, hash-verified

81}
82
83func TestRunUpgradeForOrgCreatePRRequiresYesInCI(t *testing.T) {
84 origIsCI := isRunningInCIFn
85 isRunningInCIFn = func() bool { return true }
86 defer func() {
87 isRunningInCIFn = origIsCI
88 }()
89
90 err := runUpgradeForOrg(context.Background(), "octo", nil, upgradeOptions{ctx: context.Background()}, true, false, false)
91 require.Error(t, err)
92 assert.Contains(t, err.Error(), "--yes")
93}
94
95func TestRunUpgradeForOrgEmptyOrg(t *testing.T) {
96 err := runUpgradeForOrg(context.Background(), " ", nil, upgradeOptions{ctx: context.Background()}, false, false, false)

Callers

nothing calls this directly

Calls 3

runUpgradeForOrgFunction · 0.85
BackgroundMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected