Always report server log from verbose integration test runs
If you're adding `-v` to TESTFLAGS, you probably want to see the server logs, as well as the extra output from the testing framework. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
parent
d184a0a343
commit
3795dd41ae
@ -169,8 +169,9 @@ func TestMain(m *testing.M) {
|
|||||||
fmt.Fprintln(os.Stderr, "failed to remove test root dir", err)
|
fmt.Fprintln(os.Stderr, "failed to remove test root dir", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
// only print containerd logs if the test failed
|
|
||||||
if status != 0 {
|
// only print containerd logs if the test failed or tests were run with -v
|
||||||
|
if status != 0 || testing.Verbose() {
|
||||||
fmt.Fprintln(os.Stderr, buf.String())
|
fmt.Fprintln(os.Stderr, buf.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user