MCPcopy Create free account
hub / github.com/coder/envbox / NewFakeExecer

Function NewFakeExecer

cli/clitest/fake.go:19–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func 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
34func NewFakeDockerClient() dockerutil.Client {
35 client := &dockerfake.MockClient{}

Callers 1

NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected