From 96dd57ca50de54e82cea177c317b92612ed1cf81 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 4 Jul 2022 07:13:51 -0400 Subject: podman wait can take multiple conditions Podman wait should not be defaulting to just stopped. By default wait API waits for stopped and exited. We should not override this on the client side. Signed-off-by: Daniel J Walsh --- pkg/domain/infra/abi/containers.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index 1688be57e..23a591604 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -101,6 +101,9 @@ func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []strin responses := make([]entities.WaitReport, 0, len(ctrs)) for _, c := range ctrs { response := entities.WaitReport{Id: c.ID()} + if options.Condition == nil { + options.Condition = []define.ContainerStatus{define.ContainerStateStopped, define.ContainerStateExited} + } exitCode, err := c.WaitForConditionWithInterval(ctx, options.Interval, options.Condition...) if err != nil { response.Error = err -- cgit v1.2.3-54-g00ecf