(ctx context.Context, containers Containers)
| 504 | } |
| 505 | |
| 506 | func (s *composeService) isServiceCompleted(ctx context.Context, containers Containers) (bool, int, error) { |
| 507 | for _, c := range containers { |
| 508 | res, err := s.apiClient().ContainerInspect(ctx, c.ID, client.ContainerInspectOptions{}) |
| 509 | if err != nil { |
| 510 | return false, 0, err |
| 511 | } |
| 512 | if res.Container.State != nil && res.Container.State.Status == container.StateExited { |
| 513 | return true, res.Container.State.ExitCode, nil |
| 514 | } |
| 515 | } |
| 516 | return false, 0, nil |
| 517 | } |
| 518 | |
| 519 | func (s *composeService) startService(ctx context.Context, |
| 520 | project *types.Project, service types.ServiceConfig, |
no test coverage detected