fakeDevcontainerCLI implements the agentcontainers.DevcontainerCLI interface for testing.
| 109 | // fakeDevcontainerCLI implements the agentcontainers.DevcontainerCLI |
| 110 | // interface for testing. |
| 111 | type fakeDevcontainerCLI struct { |
| 112 | up func(workspaceFolder, configPath string) (string, error) |
| 113 | upID string |
| 114 | upErr error |
| 115 | upErrC chan func() error // If set, send to return err, close to return upErr. |
| 116 | execErr error |
| 117 | execErrC chan func(cmd string, args ...string) error // If set, send fn to return err, nil or close to return execErr. |
| 118 | readConfig agentcontainers.DevcontainerConfig |
| 119 | readConfigErr error |
| 120 | readConfigErrC chan func(envs []string) error |
| 121 | |
| 122 | configMap map[string]agentcontainers.DevcontainerConfig // By config path |
| 123 | } |
| 124 | |
| 125 | func (f *fakeDevcontainerCLI) Up(ctx context.Context, workspaceFolder, configPath string, _ ...agentcontainers.DevcontainerCLIUpOptions) (string, error) { |
| 126 | if f.up != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected