smartcontractkit / smartcontractkit/chainlink
[DEVEL] Inconsistent Test Script Error Handling
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.2k
- Forks
- 2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 202
Description
Description
Some test scripts and helper functions do not consistently handle errors, which can lead to false positives or missed failures. Proper error handling ensures that test failures are detected and reported accurately.
Environment
- Chainlink repo: develop branch
- Go 1.22+
- OS: Linux 6.11.0-29-generic
Examples
integration-tests/actions/some_action.go: Error values are ignored in some helper functions.core/internal/cltest/cltest.go: Some test helpers do not check returned errors.
Steps to Reproduce
- Review test helper functions for unchecked errors.
- Run tests and introduce intentional errors to verify detection.
Additional Info
- Use
require.NoErrororassert.NoErrorfor error checks in tests. - Consider enabling
go vetor static analysis for error handling.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the unchecked error cases in integration-tests/actions/some_action.go and core/internal/cltest/cltest.go, then run the affected tests with intentional errors as described. Done means relevant test helpers check returned errors with require.NoError or assert.NoError and failures are detected and reported accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100