Skip to content

Commit

Permalink
fix live testnet smoke test support (#13634)
Browse files Browse the repository at this point in the history
Co-authored-by: Ilja Pavlovs <[email protected]>
  • Loading branch information
Tofel and iljapavlovs authored Jun 20, 2024
1 parent a11666c commit 28cf2ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Build and Lint ${{ matrix.project.name }}
continue-on-error: true
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
Expand Down Expand Up @@ -509,7 +509,7 @@ jobs:
contents: read
needs: [build-chainlink, changes, build-lint-integration-tests]
env:
SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2
SELECTED_NETWORKS: SIMULATED
CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }}
CHAINLINK_ENV_USER: ${{ github.actor }}
TEST_LOG_LEVEL: debug
Expand Down Expand Up @@ -961,7 +961,7 @@ jobs:
- name: Upload Coverage Data
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
timeout-minutes: 2
continue-on-error: true
continue-on-error: true
with:
name: cl-node-coverage-data-migration-tests
path: .covdata
Expand Down
12 changes: 10 additions & 2 deletions integration-tests/docker/test_env/test_env_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
// That is, when we specify we want to run on a live network in our config, we will run on the live network and not bother with a private network.
// Even if we explicitly declare that we want to run on a private network in the test.
// Keeping this a Kludge for now as SETH transition should change all of this anyway.
b.te.EVMNetworks = make([]*blockchain.EVMNetwork, 0)
if len(b.privateEthereumNetworks) == 1 {
if networkConfig.Simulated {
// TODO here we should save the ethereum network config to te.Cfg, but it doesn't exist at this point
Expand All @@ -419,9 +420,16 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
b.te.rpcProviders[networkConfig.ChainID] = &rpcProvider
b.te.isSimulatedNetwork = false
}
b.te.EVMNetworks = append(b.te.EVMNetworks, &networkConfig)

} else if len(b.privateEthereumNetworks) == 0 && !networkConfig.Simulated {
b.te.l.Warn().
Str("Network", networkConfig.Name).
Int64("Chain ID", networkConfig.ChainID).
Msg("Private network config provided, but we are running on a live network. Ignoring private network config.")
rpcProvider := test_env.NewRPCProvider(networkConfig.HTTPURLs, networkConfig.URLs, networkConfig.HTTPURLs, networkConfig.URLs)
b.te.rpcProviders[networkConfig.ChainID] = &rpcProvider
b.te.isSimulatedNetwork = false
}
b.te.EVMNetworks = append(b.te.EVMNetworks, &networkConfig)

if b.isEVM {
if b.evmNetworkOption != nil && len(b.evmNetworkOption) > 0 {
Expand Down

0 comments on commit 28cf2ab

Please sign in to comment.