Skip to content

migrate chaos tests to e2e/chaos package and V3 RunScenario#1226

Draft
Farber98 wants to merge 2 commits into
mainfrom
juan/chaos-pkg
Draft

migrate chaos tests to e2e/chaos package and V3 RunScenario#1226
Farber98 wants to merge 2 commits into
mainfrom
juan/chaos-pkg

Conversation

@Farber98

@Farber98 Farber98 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Why

Chaos e2e tests embedded Pumba commands, container lookup, and a V2 send/assert path directly in chaos_test.go. That was fine for EVM-only, but now we need chaos tests in other families and avoid copying all primitives and setup. (eg. Pumba, env-out parsing, etc.)

This PR extracts shared chaos helpers and migrates all TestChaos_* tests onto a single V3 scenario runner.

What

New e2e/chaos/ package:

  • Outage injection via Pumba (InjectOutage, duration constants)
  • Container resolution from ccv.Cfg (aggregator nginx, verifiers, executors, indexer)
  • ExecutorContainersForDest for dest-chain executor targeting (needed when multiple executors share the same qualifier)
  • RunScenario — outage → V3 send → offchain assert → optional dest exec confirm
  • HydrateEVMEOADefaultVerifier for EVM chaos message setup

chaos_test.go refactor:

  • All four TestChaos_* tests use RunScenario (no runV2TestCase, no inline Pumba)
  • setupChaos no longer loads chains or filters by family; EVM lib loading stays at the test call site
  • Uses tcapi.AssertMessageOptions and the V3 message pipeline

Farber98 added 2 commits July 2, 2026 11:08
Extract Pumba outage helpers and container resolution from chaos_test.go
into build/devenv/tests/e2e/chaos so cross-family e2e  can
reuse them without duplicating Pumba or cfg lookup logic
Add RunScenario pipeline (SendV3Message, assert, ConfirmExecOnDest) and refactor all TestChaos_* tests off runV2TestCase. FamilyEVM filter moves to test call site; chaos package stays family-agnostic for cross-chain reuse.
@Farber98 Farber98 changed the title Introduce shared e2e/chaos package for outage injection migrate chaos tests to e2e/chaos package and V3 RunScenario Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Code coverage report:

Package main juan/chaos-pkg Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 49.53% 49.57% +0.04%
github.com/smartcontractkit/chainlink-ccv/bootstrap 54.66% 54.66% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 13.55% 13.55% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 52.79% 52.79% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 46.47% 46.47% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.54% 35.54% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 46.25% 46.25% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.06% 63.06% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 35.18% 35.17% -0.01%
Total 46.80% 46.80% +0.00%

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