unit test fix to mock successful package install return codes

This commit is contained in:
2026-06-11 11:36:26 -05:00
parent 476607e108
commit 1a3f4f2e44
+9
View File
@@ -185,6 +185,15 @@ func TestRunMainStep0TransitionToStep2(t *testing.T) {
}
return nil
}
osStat = func(name string) (os.FileInfo, error) {
if strings.HasSuffix(name, "/go") ||
strings.HasSuffix(name, "/firecracker") ||
strings.HasSuffix(name, "/nvim") ||
strings.HasSuffix(name, ".oh-my-zsh") {
return nil, nil
}
return nil, os.ErrNotExist
}
hasCmd = func(name string) bool {
return true // all installed