mirror of
https://github.com/containers/podman.git
synced 2025-06-29 15:08:09 +08:00
Merge pull request #16437 from edsantiago/more_log_flakes
More log-flake work
This commit is contained in:
@ -65,7 +65,11 @@ var _ = Describe("Podman logs", func() {
|
||||
Expect(logc).To(Exit(0))
|
||||
cid := logc.OutputToString()
|
||||
|
||||
results := podmanTest.Podman([]string{"logs", cid})
|
||||
results := podmanTest.Podman([]string{"wait", cid})
|
||||
results.WaitWithDefaultTimeout()
|
||||
Expect(results).To(Exit(0))
|
||||
|
||||
results = podmanTest.Podman([]string{"logs", cid})
|
||||
results.WaitWithDefaultTimeout()
|
||||
Expect(results).To(Exit(0))
|
||||
Expect(results.OutputToStringArray()).To(HaveLen(3))
|
||||
|
@ -303,6 +303,7 @@ EOF
|
||||
echo "$teststring" | nc 127.0.0.1 $port_out
|
||||
|
||||
# Confirm that the container log output is the string we sent it.
|
||||
run_podman wait $cid
|
||||
run_podman logs $cid
|
||||
is "$output" "$teststring" "test string received on container"
|
||||
|
||||
|
@ -258,6 +258,13 @@ function wait_for_output {
|
||||
if [ $output != "true" ]; then
|
||||
run_podman inspect --format '{{.State.ExitCode}}' $cid
|
||||
exitcode=$output
|
||||
|
||||
# One last chance: maybe the container exited just after logs cmd
|
||||
run_podman logs $cid
|
||||
if expr "$logs" : ".*$expect" >/dev/null; then
|
||||
return
|
||||
fi
|
||||
|
||||
die "Container exited (status: $exitcode) before we saw '$expect': $logs"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user