TestHandlePMUpdate_Unknown verifies that handlePMUpdate prints generic instructions for unknown package manager installations.
(t *testing.T)
| 69 | // TestHandlePMUpdate_Unknown verifies that handlePMUpdate prints generic |
| 70 | // instructions for unknown package manager installations. |
| 71 | func 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. |
nothing calls this directly
no test coverage detected