Skip to content

[DEVEL] Inconsistent Test Script Error Handling #18653

@Caplost

Description

@Caplost

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions