Skip to content

Commit

Permalink
test: remove extra argument from check calls
Browse files Browse the repository at this point in the history
  • Loading branch information
hairyhum committed Mar 7, 2024
1 parent 67a841c commit a9c5e19
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/arg_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,34 @@ func (t *ArgumentTest) setDefaultExpectedLog() {

// assertNoError makes sure there is no error.
func (t *ArgumentTest) assertNoError(c *check.C, err error) {
c.Assert(err, check.IsNil, t)
c.Assert(err, check.IsNil)
}

// assertError checks the error against ExpectedErr.
func (t *ArgumentTest) assertError(c *check.C, err error) {
actualErr := errors.Cause(err)
c.Assert(actualErr, check.Equals, t.ExpectedErr, t)
c.Assert(actualErr, check.Equals, t.ExpectedErr)
}

// assertErrorMsg checks the error message against ExpectedErrMsg.
func (t *ArgumentTest) assertErrorMsg(c *check.C, err error) {
if t.ExpectedErrMsg != "" {
c.Assert(err.Error(), check.Equals, t.ExpectedErrMsg, t)
c.Assert(err.Error(), check.Equals, t.ExpectedErrMsg)
}
}

// assertCLI asserts the builder's CLI output against ExpectedCLI.
func (t *ArgumentTest) assertCLI(c *check.C, b *safecli.Builder) {
if t.ExpectedCLI != nil {
c.Check(b.Build(), check.DeepEquals, t.ExpectedCLI, t)
c.Check(b.Build(), check.DeepEquals, t.ExpectedCLI)
}
}

// assertLog asserts the builder's log output against ExpectedLog.
func (t *ArgumentTest) assertLog(c *check.C, b *safecli.Builder) {
if t.ExpectedCLI != nil {
t.setDefaultExpectedLog()
c.Check(b.String(), check.Equals, t.ExpectedLog, t)
c.Check(b.String(), check.Equals, t.ExpectedLog)
}
}

Expand Down

0 comments on commit a9c5e19

Please sign in to comment.