mirror of https://github.com/containers/podman.git
Merge pull request #15021 from Luap99/e2e-timeout-output
e2e: show command and output when a timeout happens
This commit is contained in:
commit
04ed519e9d
|
@ -365,7 +365,11 @@ func (s *PodmanSession) WaitWithDefaultTimeout() {
|
|||
|
||||
// WaitWithTimeout waits for process finished with DefaultWaitTimeout
|
||||
func (s *PodmanSession) WaitWithTimeout(timeout int) {
|
||||
Eventually(s, timeout).Should(Exit())
|
||||
Eventually(s, timeout).Should(Exit(), func() string {
|
||||
// in case of timeouts show output
|
||||
return fmt.Sprintf("command %v timed out\nSTDOUT: %s\nSTDERR: %s",
|
||||
s.Command.Args, string(s.Out.Contents()), string(s.Err.Contents()))
|
||||
})
|
||||
os.Stdout.Sync()
|
||||
os.Stderr.Sync()
|
||||
fmt.Println("output:", s.OutputToString())
|
||||
|
|
Loading…
Reference in New Issue