aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-11 08:06:58 +0000
committerGitHub <noreply@github.com>2022-07-11 08:06:58 +0000
commit76422ecdbbd26bf645b664ea7663e5ecf10139ba (patch)
treeec2f1d80b722efe4a2601478ba7d6e657fc30486 /pkg/domain/infra/abi
parent87feb82b07ef5b7365c5164ea1f4ee8b928e2b51 (diff)
parent96dd57ca50de54e82cea177c317b92612ed1cf81 (diff)
downloadpodman-76422ecdbbd26bf645b664ea7663e5ecf10139ba.tar.gz
podman-76422ecdbbd26bf645b664ea7663e5ecf10139ba.tar.bz2
podman-76422ecdbbd26bf645b664ea7663e5ecf10139ba.zip
Merge pull request #14818 from rhatdan/wait
podman wait can take multiple conditions
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/containers.go3
1 files changed, 3 insertions, 0 deletions
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