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

[CCIP-4171] integration-tests/smoke/ccip: add re-org tests #16056

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

makramkd
Copy link
Contributor

Requires

Supports

Copy link
Contributor

github-actions bot commented Jan 24, 2025

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , GolangCI Lint (.) , GolangCI Lint (integration-tests) , GolangCI Lint (deployment) , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , test-scripts , Core Tests (go_core_race_tests) , lint , SonarQube Scan

1. Error return value not checked: [Golang Lint (integration-tests)]

Source of Error:
integration-tests/smoke/ccip/ccip_reorg_test.go:195:50: Error return value of `testhelpers.ConfirmCommitWithExpectedSeqNumRange` is not checked (errcheck)
testhelpers.ConfirmCommitWithExpectedSeqNumRange(
 ^
**Why**: The function `testhelpers.ConfirmCommitWithExpectedSeqNumRange` returns an error that is not being checked, which is a common best practice to ensure proper error handling.

Suggested fix: Add error handling for the function call to ensure any potential errors are properly managed.

2. File not goimports-ed: [Golang Lint (integration-tests)]

Source of Error:
integration-tests/smoke/ccip/ccip_reorg_test.go:13: File is not `goimports`-ed with -local github.com/smartcontractkit/chainlink (goimports)
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
**Why**: The file is not formatted according to the `goimports` tool with the `-local` flag, which helps in organizing imports in a standard way.

Suggested fix: Run goimports -local github.com/smartcontractkit/chainlink -w integration-tests/smoke/ccip/ccip_reorg_test.go to format the file correctly.

3. fmt.Sprintf can be replaced: [Golang Lint (integration-tests)]

Source of Error:
integration-tests/smoke/ccip/ccip_reorg_test.go:109:62: fmt.Sprintf can be replaced with faster strconv.FormatUint (perfsprint)
details, err := chainsel.GetChainDetailsByChainIDAndFamily(fmt.Sprintf("%d", chain.ChainID), chainsel.FamilyEVM)
 ^
**Why**: Using `fmt.Sprintf` for converting integers to strings is less efficient compared to `strconv.FormatUint`.

Suggested fix: Replace fmt.Sprintf("%d", chain.ChainID) with strconv.FormatUint(chain.ChainID, 10) for better performance.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

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