| 283 | } |
| 284 | |
| 285 | func (d *DryRunClient) ExecCreate(ctx context.Context, container string, config client.ExecCreateOptions) (client.ExecCreateResult, error) { |
| 286 | b := make([]byte, 32) |
| 287 | _, _ = rand.Read(b) |
| 288 | id := fmt.Sprintf("%x", b) |
| 289 | d.execs.Store(id, execDetails{ |
| 290 | container: container, |
| 291 | command: config.Cmd, |
| 292 | }) |
| 293 | return client.ExecCreateResult{ |
| 294 | ID: id, |
| 295 | }, nil |
| 296 | } |
| 297 | |
| 298 | func (d *DryRunClient) ExecStart(ctx context.Context, execID string, config client.ExecStartOptions) (client.ExecStartResult, error) { |
| 299 | _, ok := d.execs.LoadAndDelete(execID) |