()
| 324 | }() |
| 325 | } |
| 326 | func (h *Harness) Cleanup() { |
| 327 | h.mu.Lock() |
| 328 | defer h.mu.Unlock() |
| 329 | for name, c := range h.Nodes { |
| 330 | if err := c.Terminate(h.ctx); err != nil { |
| 331 | h.t.Logf("failed to terminate container %s: %v", name, err) |
| 332 | } |
| 333 | } |
| 334 | if err := h.Network.Remove(context.Background()); err != nil { |
| 335 | h.t.Logf("failed to remove network: %v", err) |
| 336 | } |
| 337 | } |
| 338 | func (h *Harness) Exec(nodeName string, cmd []string) (string, string, error) { |
| 339 | h.mu.Lock() |
| 340 | container, ok := h.Nodes[nodeName] |