fixed unit tests

This commit is contained in:
2026-05-30 17:19:10 -05:00
parent 83c929c24b
commit 206b4cb999
+3 -3
View File
@@ -314,11 +314,11 @@ func TestInstallSystemPackagesBrewFailures(t *testing.T) {
defer resetMocks()
pkgMgr = "brew"
runCmd = func(_ []string, _ CmdOpts) CmdResult { return CmdResult{ExitCode: 1} }
captureStdout(t, func() {
out := captureStdout(t, func() {
installSystemPackages([]string{"git"}, nil)
})
if !hasIssueContaining("System package failed to install") {
t.Error("expected error logged for brew failure")
if !strings.Contains(out, "System package failed to install") {
t.Error("expected warning logged for brew failure")
}
}