-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-3428 Enabling ccip smoke test for testnet #14452
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
df3df9d
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 9106334
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 65efde9
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 99ab4c1
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 357acdc
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG e5385f7
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 09bd660
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 471f296
enabling test for testnet
AnieeG c1cea87
home chain selector logic
AnieeG 1ab2860
testnet deployment
AnieeG 792dd3b
remove unwanted
AnieeG 3a11caa
lint fix
AnieeG 55abd7e
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
AnieeG 919694f
add readme
AnieeG b8bd80a
fix typo
AnieeG 89211b9
fix
AnieeG 6d75aa6
make timer rely on test deadline
AnieeG fd7d29b
update comment
AnieeG 66e937f
update comment
AnieeG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## Overview | ||
|
||
This package is used to create ephemeral environment for local/CI testing. | ||
It sets up an environment with local Docker containers running Chainlink nodes and a job distributor. | ||
It can either create new simulated private Ethereum network containers or connect to existing testnets/mainnets. | ||
|
||
### Run Tests with Devenv | ||
|
||
The tests created with this environment are run as [end-to-end integration smoke tests](../../smoke). | ||
|
||
#### Setting Up Testconfig with Simulated Private Ethereum Network | ||
|
||
To run tests (e.g., [ccip-test](../../smoke/ccip_test.go)), | ||
you need to set up the testconfig following the [testconfig setup instructions](../../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](../../testconfig/default.toml) config unless overridden by product-specific config. | ||
For example, the [ccip-test](../../smoke/ccip_test.go) uses [ccip.toml](../../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. | ||
These are read from environment variables. For example, Chainlink image, Job-Distributor image, etc. | ||
All such environment variables are listed in the [sample.env](./.sample.env) file. | ||
You can create a `.env` file in the same directory of the test and set the required environment variables. | ||
|
||
#### Setting Up Testconfig for Running Tests with Existing Testnet/Mainnet | ||
|
||
To run tests with existing testnet/mainnet, set up the testconfig with the details of the testnet/mainnet networks. | ||
Following the integration-test [testconfig framework](../../testconfig/README.md#configuration-and-overrides), | ||
create a new `overrides.toml` file with testnet/mainnet network details and place it under any location in the `integration-tests` directory. | ||
By default, tests are run with private Ethereum network containers set up in the same Docker network as | ||
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](../../smoke/ccip_test.go) tests with Sepolia, Avax, and Binance testnets, | ||
copy the contents of [sepolia_avax_binance.toml](../../testconfig/ccip/overrides/sepolia_avax_binance.toml) | ||
to the `overrides.toml` file. | ||
|
||
Before running the test, ensure that RPC and wallet secrets are set as environment variables. | ||
Refer to the environment variables pattern in the [sample.env](./.sample.env) file to | ||
provide necessary secrets applicable to the network you are running the tests against: | ||
- `E2E_TEST_<networkName>_WALLET_KEY_<sequence_number>` | ||
- `E2E_TEST_<networkName>_RPC_HTTP_URL_<sequence_number>` | ||
- `E2E_TEST_<networkName>_RPC_WS_URL_<sequence_number>` | ||
|
||
Now you are all set to run the tests with the existing testnet/mainnet. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the downside of hitting the deadline other than failing with a timeout which will happen anyways?
I think seconds should be enough? If the deadline is 5 minutes then 1 minute is 20% of the time. So either make it a percentage of the total deadline 2-5% or just a couple of seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no real downside other than log output after the test times out, the test runtime will print all running goroutines and their stack