diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index d40d375f860..ebe5b62a709 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -935,19 +935,6 @@ runner-test-matrix: # START: CCIPv1.6 tests - - id: smoke/ccip/ccip_test.go:* - path: integration-tests/smoke/ccip/ccip_test.go - test_env_type: docker - runs_on: ubuntu-latest - triggers: - - PR E2E Core Tests - - Nightly E2E Tests - test_cmd: cd integration-tests/smoke/ccip && go test ccip_test.go -timeout 25m -test.parallel=2 -count=1 -json - pyroscope_env: ci-smoke-ccipv1_6-evm-simulated - test_env_vars: - E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 - E2E_JD_VERSION: 0.6.0 - - id: smoke/ccip/ccip_message_limitations_test.go:* path: integration-tests/smoke/ccip/ccip_message_limitations_test.go test_env_type: docker diff --git a/deployment/ccip/changeset/initial_deploy_test.go b/deployment/ccip/changeset/initial_deploy_test.go deleted file mode 100644 index 97e516c8f94..00000000000 --- a/deployment/ccip/changeset/initial_deploy_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package changeset - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" - - "github.com/smartcontractkit/chainlink/deployment/environment/memory" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" - "github.com/smartcontractkit/chainlink/v2/core/logger" - - "github.com/stretchr/testify/require" -) - -func TestInitialDeploy(t *testing.T) { - lggr := logger.TestLogger(t) - tenv := NewMemoryEnvironmentWithJobsAndContracts(t, lggr, memory.MemoryEnvironmentConfig{ - Chains: 3, - Nodes: 4, - Bootstraps: 1, - NumOfUsersPerChain: 1, - }, nil) - e := tenv.Env - state, err := LoadOnchainState(e) - require.NoError(t, err) - // Add all lanes - require.NoError(t, AddLanesForAll(e, state)) - // Need to keep track of the block number for each chain so that event subscription can be done from that block. - startBlocks := make(map[uint64]*uint64) - // Send a message from each chain to every other chain. - expectedSeqNum := make(map[SourceDestPair]uint64) - expectedSeqNumExec := make(map[SourceDestPair][]uint64) - - for src := range e.Chains { - for dest, destChain := range e.Chains { - if src == dest { - continue - } - latesthdr, err := destChain.Client.HeaderByNumber(testcontext.Get(t), nil) - require.NoError(t, err) - block := latesthdr.Number.Uint64() - startBlocks[dest] = &block - require.GreaterOrEqual(t, len(tenv.Users[src]), 1) - msgSentEvent, err := DoSendRequest(t, e, state, - WithTestRouter(false), - WithSourceChain(src), - WithDestChain(dest), - WithEvm2AnyMessage(router.ClientEVM2AnyMessage{ - Receiver: common.LeftPadBytes(state.Chains[dest].Receiver.Address().Bytes(), 32), - Data: []byte("hello"), - TokenAmounts: nil, - FeeToken: common.HexToAddress("0x0"), - ExtraArgs: nil, - }), - WithSender(tenv.Users[src][0]), - ) - require.NoError(t, err) - expectedSeqNum[SourceDestPair{ - SourceChainSelector: src, - DestChainSelector: dest, - }] = msgSentEvent.SequenceNumber - expectedSeqNumExec[SourceDestPair{ - SourceChainSelector: src, - DestChainSelector: dest, - }] = []uint64{msgSentEvent.SequenceNumber} - } - } - - // Wait for all commit reports to land. - ConfirmCommitForAllWithExpectedSeqNums(t, e, state, expectedSeqNum, startBlocks) - - // Confirm token and gas prices are updated - ConfirmTokenPriceUpdatedForAll(t, e, state, startBlocks, - DefaultInitialPrices.LinkPrice, DefaultInitialPrices.WethPrice) - // TODO: Fix gas prices? - //ConfirmGasPriceUpdatedForAll(t, e, state, startBlocks) - // - //// Wait for all exec reports to land - ConfirmExecWithSeqNrsForAll(t, e, state, expectedSeqNumExec, startBlocks) -} diff --git a/deployment/environment/devenv/README.md b/deployment/environment/devenv/README.md index f5e11f0475e..e6f5bc1b5ac 100644 --- a/deployment/environment/devenv/README.md +++ b/deployment/environment/devenv/README.md @@ -14,11 +14,11 @@ Pre-requisites: #### Setting Up Testconfig with Simulated Private Ethereum Network -To run tests (e.g., [ccip-test](../../integration-tests/smoke/ccip_test.go)), -you need to set up the testconfig following the [testconfig setup instructions](../../integration-tests/testconfig/README.md). +To run tests (e.g., [ccip-test](../../../integration-tests/ccip-tests/smoke/ccip_test.go)), +you need to set up the testconfig following the [testconfig setup instructions](../../../integration-tests/testconfig/README.md). The testconfig specifies the details of the different configurations to set up the environment and run the tests. -Generally, tests are run with the [default](../../integration-tests/testconfig/default.toml) config unless overridden by product-specific config. -For example, the [ccip-test](../../integration-tests/smoke/ccip_test.go) uses [ccip.toml](../../integration-tests/testconfig/ccip/ccip.toml) to specify +Generally, tests are run with the [default](../../../integration-tests/testconfig/default.toml) config unless overridden by product-specific config. +For example, the [ccip-test](../../../integration-tests/ccip-tests/smoke/ccip_test.go) uses [ccip.toml](../../../integration-tests/testconfig/ccip/ccip.toml) to specify CCIP-specific test environment details. There are additional secret configuration parameters required by the `devenv` environment that are not stored in the testconfig. @@ -37,7 +37,7 @@ By default, tests are run with private Ethereum network containers set up in the the Chainlink nodes and job distributor. To run tests against existing testnet/mainnet, set the `selected_network` field in the testconfig with the specific network names. -For example, if running [ccip-smoke](../../integration-tests/smoke/ccip_test.go) tests with Sepolia, Avax, and Binance testnets, +For example, if running [ccip-smoke](../../../integration-tests/ccip-tests/smoke/ccip_test.go) tests with Sepolia, Avax, and Binance testnets, copy the contents of [sepolia_avax_binance.toml](../../integration-tests/testconfig/ccip/overrides/sepolia_avax_binance.toml) to the `overrides.toml` file. @@ -48,4 +48,4 @@ provide necessary secrets applicable to the network you are running the tests ag - `E2E_TEST__RPC_HTTP_URL_` - `E2E_TEST__RPC_WS_URL_` -Now you are all set to run the tests with the existing testnet/mainnet. \ No newline at end of file +Now you are all set to run the tests with the existing testnet/mainnet. diff --git a/integration-tests/smoke/ccip/ccip_test.go b/integration-tests/smoke/ccip/ccip_test.go deleted file mode 100644 index ca30c9281c4..00000000000 --- a/integration-tests/smoke/ccip/ccip_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package smoke - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" - - "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" - testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" - "github.com/smartcontractkit/chainlink/v2/core/logger" -) - -func TestInitialDeployOnLocal(t *testing.T) { - t.Parallel() - lggr := logger.TestLogger(t) - config := &changeset.TestConfigs{} - tenv, _, _ := testsetups.NewLocalDevEnvironmentWithDefaultPrice(t, lggr, config) - e := tenv.Env - state, err := changeset.LoadOnchainState(e) - require.NoError(t, err) - - // Add all lanes - require.NoError(t, changeset.AddLanesForAll(e, state)) - // Need to keep track of the block number for each chain so that event subscription can be done from that block. - startBlocks := make(map[uint64]*uint64) - // Send a message from each chain to every other chain. - expectedSeqNum := make(map[changeset.SourceDestPair]uint64) - expectedSeqNumExec := make(map[changeset.SourceDestPair][]uint64) - for src := range e.Chains { - for dest, destChain := range e.Chains { - if src == dest { - continue - } - latesthdr, err := destChain.Client.HeaderByNumber(testcontext.Get(t), nil) - require.NoError(t, err) - block := latesthdr.Number.Uint64() - startBlocks[dest] = &block - require.GreaterOrEqual(t, len(tenv.Users[src]), 2) - msgSentEvent, err := changeset.DoSendRequest(t, e, state, - changeset.WithSender(tenv.Users[src][1]), - changeset.WithSourceChain(src), - changeset.WithDestChain(dest), - changeset.WithTestRouter(false), - changeset.WithEvm2AnyMessage(router.ClientEVM2AnyMessage{ - Receiver: common.LeftPadBytes(state.Chains[dest].Receiver.Address().Bytes(), 32), - Data: []byte("hello world"), - TokenAmounts: nil, - FeeToken: common.HexToAddress("0x0"), - ExtraArgs: nil, - })) - require.NoError(t, err) - expectedSeqNum[changeset.SourceDestPair{ - SourceChainSelector: src, - DestChainSelector: dest, - }] = msgSentEvent.SequenceNumber - expectedSeqNumExec[changeset.SourceDestPair{ - SourceChainSelector: src, - DestChainSelector: dest, - }] = []uint64{msgSentEvent.SequenceNumber} - } - } - - // Wait for all commit reports to land. - changeset.ConfirmCommitForAllWithExpectedSeqNums(t, e, state, expectedSeqNum, startBlocks) - - // After commit is reported on all chains, token prices should be updated in FeeQuoter. - for dest := range e.Chains { - linkAddress := state.Chains[dest].LinkToken.Address() - feeQuoter := state.Chains[dest].FeeQuoter - timestampedPrice, err := feeQuoter.GetTokenPrice(nil, linkAddress) - require.NoError(t, err) - require.Equal(t, changeset.MockLinkPrice, timestampedPrice.Value) - } - - // Wait for all exec reports to land - changeset.ConfirmExecWithSeqNrsForAll(t, e, state, expectedSeqNumExec, startBlocks) - - // TODO: Apply the proposal. -}