(dataDir, updateDir string, client *http.Client, gitClient gitClient, ios *iostreams.IOStreams)
| 39 | } |
| 40 | |
| 41 | func newTestManager(dataDir, updateDir string, client *http.Client, gitClient gitClient, ios *iostreams.IOStreams) *Manager { |
| 42 | return &Manager{ |
| 43 | dataDir: func() string { return dataDir }, |
| 44 | updateDir: func() string { return updateDir }, |
| 45 | lookPath: func(exe string) (string, error) { return exe, nil }, |
| 46 | findSh: func() (string, error) { return "sh", nil }, |
| 47 | newCommand: func(exe string, args ...string) *exec.Cmd { |
| 48 | args = append([]string{os.Args[0], "-test.run=TestHelperProcess", "--", exe}, args...) |
| 49 | cmd := exec.Command(args[0], args[1:]...) |
| 50 | if ios != nil { |
| 51 | cmd.Stdout = ios.Out |
| 52 | cmd.Stderr = ios.ErrOut |
| 53 | } |
| 54 | cmd.Env = []string{"GH_WANT_HELPER_PROCESS=1"} |
| 55 | return cmd |
| 56 | }, |
| 57 | config: config.NewBlankConfig(), |
| 58 | io: ios, |
| 59 | client: client, |
| 60 | gitClient: gitClient, |
| 61 | platform: func() (string, string) { |
| 62 | return "windows-amd64", ".exe" |
| 63 | }, |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func TestManager_List(t *testing.T) { |
| 68 | dataDir := t.TempDir() |
no test coverage detected