Skip to content

Conversation

cristiand391
Copy link
Contributor

Ref: #2750 (comment)

Replace eq assertion helper with Testify's assert.Equal.

@cristiand391 cristiand391 changed the title Use Testify assertions in test Use Testify assertions in tests Jan 16, 2021
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, and thank you, but: I believe that testify's Equal wants the expected value to be first. So, all order of arguments should be reversed. Think you could do that? Thanks

@cristiand391
Copy link
Contributor Author

Sorry about that, should be ok now.

@cristiand391 cristiand391 requested a review from mislav January 19, 2021 00:07
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great; thank you!

I've also pushed a change to use testify's error-matching assertions wherever possible. The logic of the tests stays the same, but the failure messages and the readability of tests will be improved.

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(GitHub is having a hiccup, so re-approving)
Thank you so much, @cristiand391!

@mislav mislav merged commit b5366c6 into cli:trunk Jan 19, 2021
@cristiand391 cristiand391 deleted the use-testify-assertion branch January 19, 2021 13:26
Copy link

@bmac-55 bmac-55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@bmac-55 bmac-55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cristiand391:use-testify-assertion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants