Skip to content

Conversation

alexandear
Copy link
Member

The PR refactors test assertions with the help of https://github.com/Antonboom/testifylint:

  • replace sort.Strings+assert.Equal with assert.ElementsMatch;
  • use require.NoError instead of assert.NoError to avoid possible panic;
  • replace assert.Len with require.Len where needed;
  • switch actual and expected parameters in assert statements.

@ldez ldez changed the title dev: refactor and fix test assertions dev: refactor some test assertions Sep 12, 2023
@ldez ldez self-requested a review September 12, 2023 10:14
@ldez ldez added the topic: cleanup Related to code, process, or doc cleanup label Sep 12, 2023
@Antonboom
Copy link
Contributor

Antonboom commented Sep 14, 2023

Appreciated :)

This make my PR "lighter"

@ldez ldez merged commit 0704271 into golangci:master Sep 18, 2023
@alexandear alexandear deleted the dev-refactor-test-assertions branch September 18, 2023 20:33
@ldez ldez modified the milestone: v1.55 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants