Skip to content

Commit fc003df

Browse files
committed
fix:ci panic because res=nil
Signed-off-by: ningmingxiao <[email protected]>
1 parent ae7c0e5 commit fc003df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/testutil/testutil.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ func (c *Cmd) AssertFail() {
397397
func (c *Cmd) AssertExitCode(exitCode int) {
398398
c.Base.T.Helper()
399399
res := c.runIfNecessary()
400+
assert.Equal(c.Base.T, res == nil, false)
400401
assert.Assert(c.Base.T, res.ExitCode == exitCode, res)
401402
}
402403

0 commit comments

Comments
 (0)