smartcontractkit / smartcontractkit/chainlink

[DEVEL] Inconsistent Test Script Error Handling

Open
#18,653 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Review test helper functions for unchecked errors.
  2. Run tests and introduce intentional errors to verify detection.

Additional Info

  • Use require.NoError or assert.NoError for error checks in tests.
  • Consider enabling go vet or static analysis for error handling.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.