Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Replace assert pkg with the require pkg #285

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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