Skip to content

feat(tests): env agnostic boostrapper for e2e/load#764

Open
rodrigombsoares wants to merge 3 commits into
pr2-token-lanefrom
pr3-env-bootstrap
Open

feat(tests): env agnostic boostrapper for e2e/load#764
rodrigombsoares wants to merge 3 commits into
pr2-token-lanefrom
pr3-env-bootstrap

Conversation

@rodrigombsoares

@rodrigombsoares rodrigombsoares commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Third stacked PR after pr2-token-lane. Extracts a shared environment bootstrap layer for CCIP devenv e2e and load tests so both suites use one setup path instead of duplicating inline LoadOutput / NewLibFromCCVEnv / ChainsMap / verifier wiring. This env bootstrapper takes care of env specific configs (devenv/prod-testnet/mainnet)

Tests select their target via -ccip-env (default devenv, overridable by CCIP_ENV) and share BootstrapE2E. IsRemote() branches for prod-testnet are included but inactive in default devenv CI.

WASP fires more Call() invocations than estimateMessages predicts; SetSequentialSends now uses estimate + 3 buffer.

Stack: mainpr1-load-metricspr2-token-lanepr3-env-bootstrap

Features

Environment selection (env.go, env_test.go)

  • -ccip-env flag with CCIP_ENV default (devenv | prod-testnet)
  • ResolveConfigPath with CCIP_CONFIG_FILE override only on prod-testnet — devenv always uses env-canton-evm-out.toml, ignoring a stray CCIP_CONFIG_FILE in the environment
  • ParseEnvFromFlag, ConfigPath(), IsRemote()
  • Unit tests updated: devenv ignores CCIP_CONFIG_FILE; prod-testnet still honors it

Shared bootstrap (helpers.go)

  • E2EBootstrap struct and BootstrapE2E(t, env)
  • Env-aware helpers: SetupCantonSend, SetupCantonTokenSend, SetupCantonReceive, ResolveEVMReceiver, ConfirmCantonSendOnSource, ConfirmEVMSendOnSource, ConfirmExecTimeout, ConfirmSendTimeout(env), EVMToCantonMessageOptions
  • Devenv-only: container log capture on failure
  • Remote-only: skip when CANTON_GRPC_URL unset; log required balances instead of minting
  • SetSequentialSends before SetupSend (PR2 fix preserved)

E2E tests

  • canton2evm_e2e_test.go and evm2canton_e2e_test.go refactored to ParseEnvFromFlag + BootstrapE2E
  • Token lanes use ResolveTokenLane(t, boot.Env, …)
  • canton2evm_send_validation_test.go left unchanged (inline devenv fixture)

Load tests

  • Boot-based discover/confirm helpers; runWASP skip-exec and indexer logging
  • All four gun_*_test.go files wired through shared bootstrap
  • Token load uses boot.SetupCantonTokenSend via sequentialSendsForLoad(sched)estimateMessages + waspSequentialSendBuffer (3) because WASP always fires more calls than the schedule estimate

CI fix (ccip-load-tests.yml)

  • CCIP_CONFIG_FILE gated to prod-testnet only (matches composite action behavior):
    CCIP_CONFIG_FILE: ${{ inputs.ccip_env == 'prod-testnet' && inputs.config_file || '' }}

Testing

@rodrigombsoares rodrigombsoares requested a review from a team as a code owner July 8, 2026 03:33
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

👋 rodrigombsoares, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@rodrigombsoares rodrigombsoares changed the base branch from main to pr2-token-lane July 8, 2026 03:34
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