Skip to content

Conversation

@dmigwi
Copy link

@dmigwi dmigwi commented Aug 5, 2024

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Use assert package (github.com/stretchr/testify/assert) whose tests outputs are dependent of each other, creates a situation where all tests crash if one of the dependent test output fails.

With require package(github.com/stretchr/testify/require) test fail gracefully without affecting other unrelated tests.

Its is also highlighted in the documentation: https://pkg.go.dev/github.com/stretchr/[email protected]/require#hdr-Assertions

The require package have same global functions as in the assert package, but instead of returning a boolean result they call t.FailNow().

@dmigwi dmigwi changed the title Replace assert pkg with the require pkg Fix: Replace assert pkg with the require pkg Aug 5, 2024
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.

1 participant