mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Merge pull request #10456 from rhatdan/flake1
Fix race on podman start --all
This commit is contained in:
@ -408,7 +408,14 @@ func (p *PodmanTestIntegration) RunLsContainer(name string) (*PodmanSessionInteg
|
||||
podmanArgs = append(podmanArgs, "-d", ALPINE, "ls")
|
||||
session := p.Podman(podmanArgs)
|
||||
session.WaitWithDefaultTimeout()
|
||||
return session, session.ExitCode(), session.OutputToString()
|
||||
if session.ExitCode() != 0 {
|
||||
return session, session.ExitCode(), session.OutputToString()
|
||||
}
|
||||
cid := session.OutputToString()
|
||||
|
||||
wsession := p.Podman([]string{"wait", cid})
|
||||
wsession.WaitWithDefaultTimeout()
|
||||
return session, wsession.ExitCode(), cid
|
||||
}
|
||||
|
||||
// RunNginxWithHealthCheck runs the alpine nginx container with an optional name and adds a healthcheck into it
|
||||
@ -431,7 +438,14 @@ func (p *PodmanTestIntegration) RunLsContainerInPod(name, pod string) (*PodmanSe
|
||||
podmanArgs = append(podmanArgs, "-d", ALPINE, "ls")
|
||||
session := p.Podman(podmanArgs)
|
||||
session.WaitWithDefaultTimeout()
|
||||
return session, session.ExitCode(), session.OutputToString()
|
||||
if session.ExitCode() != 0 {
|
||||
return session, session.ExitCode(), session.OutputToString()
|
||||
}
|
||||
cid := session.OutputToString()
|
||||
|
||||
wsession := p.Podman([]string{"wait", cid})
|
||||
wsession.WaitWithDefaultTimeout()
|
||||
return session, wsession.ExitCode(), cid
|
||||
}
|
||||
|
||||
// BuildImage uses podman build and buildah to build an image
|
||||
|
@ -25,6 +25,8 @@ load helpers
|
||||
die "podman start --all restarted a running container"
|
||||
fi
|
||||
|
||||
run_podman wait $cid_none_implicit $cid_none_explicit $cid_on_failure
|
||||
|
||||
run_podman rm $cid_none_implicit $cid_none_explicit $cid_on_failure
|
||||
run_podman stop -t 1 $cid_always
|
||||
run_podman rm $cid_always
|
||||
|
Reference in New Issue
Block a user