MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestHandlePMUpdate_Unknown

Function TestHandlePMUpdate_Unknown

cmd/update_test.go:71–83  ·  view source on GitHub ↗

TestHandlePMUpdate_Unknown verifies that handlePMUpdate prints generic instructions for unknown package manager installations.

(t *testing.T)

Source from the content-addressed store, hash-verified

69// TestHandlePMUpdate_Unknown verifies that handlePMUpdate prints generic
70// instructions for unknown package manager installations.
71func TestHandlePMUpdate_Unknown(t *testing.T) {
72 res := updatepolicy.Result{
73 CurrentVersion: "1.0.0",
74 LatestVersion: "2.0.0",
75 }
76 // This path doesn't match any known package manager but isPMManaged would return false
77 // for this path, so we just verify the error message format
78 binPath := "/some/unknown/pm/path/tnr"
79
80 err := handlePMUpdate(res, binPath)
81 assert.Error(t, err)
82 assert.Contains(t, err.Error(), "package manager")
83}
84
85// TestUpdateCommandAnnotation verifies that the update command has the
86// skipUpdateCheck annotation set to prevent redundant update checks.

Callers

nothing calls this directly

Calls 2

handlePMUpdateFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected