-
Notifications
You must be signed in to change notification settings - Fork 71
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
Enable testifylint and fix the issues #2065
Conversation
fix: Replace require.NoError with assert.NoError in HTTP handlers
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
enable-all: true | ||
disable: | ||
# good check, but we have too many assert.(No)?Errorf? so excluding for now | ||
- require-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It tells you to use require.NoError(t, err) instead of assert.NoError(t, err). Presumably because otherwise you're reading bad values in the subsequent code.
Integration failures are unrelated (TestBundleInitOnMlopsStacks). |
Changes
There were 2 cases we --fix did the wrong thing - this seems to a be a bug in linter: Antonboom/testifylint#210
Nonetheless, I kept that check enabled, it seems useful, just need to be fixed manually after autofix.
Tests
Existing tests