fixed unit tests
This commit is contained in:
+3
-3
@@ -314,11 +314,11 @@ func TestInstallSystemPackagesBrewFailures(t *testing.T) {
|
|||||||
defer resetMocks()
|
defer resetMocks()
|
||||||
pkgMgr = "brew"
|
pkgMgr = "brew"
|
||||||
runCmd = func(_ []string, _ CmdOpts) CmdResult { return CmdResult{ExitCode: 1} }
|
runCmd = func(_ []string, _ CmdOpts) CmdResult { return CmdResult{ExitCode: 1} }
|
||||||
captureStdout(t, func() {
|
out := captureStdout(t, func() {
|
||||||
installSystemPackages([]string{"git"}, nil)
|
installSystemPackages([]string{"git"}, nil)
|
||||||
})
|
})
|
||||||
if !hasIssueContaining("System package failed to install") {
|
if !strings.Contains(out, "System package failed to install") {
|
||||||
t.Error("expected error logged for brew failure")
|
t.Error("expected warning logged for brew failure")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user