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

Function TestRunUpgradeForOrgCreateIssueRequiresYesInCI

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

Source from the content-addressed store, hash-verified

69}
70
71func TestRunUpgradeForOrgCreateIssueRequiresYesInCI(t *testing.T) {
72 origIsCI := isRunningInCIFn
73 isRunningInCIFn = func() bool { return true }
74 defer func() {
75 isRunningInCIFn = origIsCI
76 }()
77
78 err := runUpgradeForOrg(context.Background(), "octo", nil, upgradeOptions{ctx: context.Background()}, false, true, false)
79 require.Error(t, err)
80 assert.Contains(t, err.Error(), "--yes")
81}
82
83func TestRunUpgradeForOrgCreatePRRequiresYesInCI(t *testing.T) {
84 origIsCI := isRunningInCIFn

Callers

nothing calls this directly

Calls 3

runUpgradeForOrgFunction · 0.85
BackgroundMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected