MCPcopy
hub / github.com/cli/cli / TestManager_Upgrade_NoExtensions

Function TestManager_Upgrade_NoExtensions

pkg/cmd/extension/manager_test.go:213–223  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

211}
212
213func TestManager_Upgrade_NoExtensions(t *testing.T) {
214 dataDir := t.TempDir()
215 updateDir := t.TempDir()
216 ios, _, stdout, stderr := iostreams.Test()
217
218 m := newTestManager(dataDir, updateDir, nil, nil, ios)
219 err := m.Upgrade("", false)
220 assert.EqualError(t, err, "no extensions installed")
221 assert.Equal(t, "", stdout.String())
222 assert.Equal(t, "", stderr.String())
223}
224
225func TestManager_Upgrade_NoMatchingExtension(t *testing.T) {
226 dataDir := t.TempDir()

Callers

nothing calls this directly

Calls 5

TestFunction · 0.92
newTestManagerFunction · 0.85
EqualMethod · 0.80
UpgradeMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected