Merge pull request #4994 from kzys/kill-before-buf

test: stop containerd before accessing the stdout
This commit is contained in:
Derek McGowan 2021-02-03 15:05:41 -08:00 committed by GitHub
commit 40542305bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,9 +139,9 @@ func TestMain(m *testing.M) {
// pull a seed image
log.G(ctx).WithField("image", testImage).Info("start to pull seed image")
if _, err = client.Pull(ctx, testImage, WithPullUnpack); err != nil {
fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String())
ctrd.Kill()
ctrd.Wait()
fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String())
os.Exit(1)
}