From 1c76a832418cb9026cf0268f6e2f1750a969629e Mon Sep 17 00:00:00 2001 From: Ivan Vlasic Date: Tue, 7 Dec 2021 08:44:01 +0100 Subject: [PATCH] add actual output to failed tests --- go.sum | 2 -- kit/clitest/clitest.go | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/go.sum b/go.sum index a09c9e42..489ff794 100644 --- a/go.sum +++ b/go.sum @@ -360,8 +360,6 @@ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQN github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo= github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= -github.com/mantil-io/mantil.go v0.1.3-0.20211125124945-bd8269e44ff7 h1:w0mBTBqcqyA4KhfmaR+KmlBUU7lDvMDeEafqNub7bn8= -github.com/mantil-io/mantil.go v0.1.3-0.20211125124945-bd8269e44ff7/go.mod h1:cRTxZIbJ86YO4lrWrjGzUziVv7Mmi/khpFtckWz1498= github.com/mantil-io/mantil.go v0.1.7 h1:X3rt3gNB56Nxnx/HEEgUPx1I87zHdlldZxJThiiPqF4= github.com/mantil-io/mantil.go v0.1.7/go.mod h1:iXF1rhcmSHb8pTj3b2uaySxHhBoikVpo/Zifa6DuwKE= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= diff --git a/kit/clitest/clitest.go b/kit/clitest/clitest.go index 44e5ba89..8a1a3463 100644 --- a/kit/clitest/clitest.go +++ b/kit/clitest/clitest.go @@ -305,7 +305,7 @@ func (e *Expect) Success() *Expect { if e.exitCode == math.MinInt { e.t.Errorf("[%s] error %s", e.cmdStr, e.runError) } else { - e.t.Errorf("[%s] should have zero exit code, acutal %d", e.cmdStr, e.exitCode) + e.t.Errorf("[%s] should have zero exit code, actual %d", e.cmdStr, e.exitCode) } } return e @@ -336,7 +336,7 @@ func (e *Expect) Stderr() *Expect { func (e *Expect) Contains(str string) *Expect { e.t.Helper() if !strings.Contains(e.out, str) { - e.t.Errorf("[%s] %s should contain %s", e.cmdStr, e.outType, str) + e.t.Errorf("[%s] %s should contain %s, actual output: %s", e.cmdStr, e.outType, str, e.out) } return e }