| 17 | ) |
| 18 | |
| 19 | func NewFakeExecer() *xunixfake.FakeExec { |
| 20 | return &xunixfake.FakeExec{ |
| 21 | Commands: map[string]*xunixfake.FakeCmd{}, |
| 22 | DefaultFakeCmd: &xunixfake.FakeCmd{ |
| 23 | FakeCmd: &testingexec.FakeCmd{}, |
| 24 | FakeProcess: &os.Process{Pid: 1111}, |
| 25 | // The main use of exec commands in this repo |
| 26 | // are to spawn daemon processes so ideally the |
| 27 | // default behavior is that they do not exist. |
| 28 | // nolint |
| 29 | WaitFn: func() error { select {} }, |
| 30 | }, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func NewFakeDockerClient() dockerutil.Client { |
| 35 | client := &dockerfake.MockClient{} |