ComposeDownOnSetupFailure tears down the managed docker-compose stack so a retry after a per-test-set setup failure (e.g. agent-readiness timeout) does not hit a "container name already in use" conflict from the dependency containers/network left behind. No-op when there is no managed app or it is n
(_ context.Context)
| 1320 | // containers/network left behind. No-op when there is no managed app or it is |
| 1321 | // not a compose app (App.ComposeDown self-guards on kind == DockerCompose). |
| 1322 | func (a *AgentClient) ComposeDownOnSetupFailure(_ context.Context) error { |
| 1323 | ap, err := a.getApp() |
| 1324 | if err != nil { |
| 1325 | a.logger.Debug("ComposeDownOnSetupFailure: no managed app to tear down") |
| 1326 | return nil |
| 1327 | } |
| 1328 | ap.ComposeDown() |
| 1329 | return nil |
| 1330 | } |
| 1331 | |
| 1332 | func (a *AgentClient) startInDocker(ctx context.Context, logger *zap.Logger, opts models.SetupOptions) error { |
| 1333 | keployAlias, err := kdocker.GetKeployDockerAlias(ctx, logger, &config.Config{ |
nothing calls this directly
no test coverage detected