Skip to content

Commit

Permalink
enable rmn tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkouv committed Nov 26, 2024
1 parent d77db32 commit a38ca78
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 46 deletions.
60 changes: 28 additions & 32 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1030,21 +1030,20 @@ runner-test-matrix:
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

# Enable after flaking issue is resolved
# - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughObservers$
# path: integration-tests/smoke/ccip/ccip_rmn_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 -test.run ^TestRMN_NotEnoughObservers$ -timeout 12m -test.parallel=1 -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
# E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
# E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughObservers$
path: integration-tests/smoke/ccip/ccip_rmn_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 -test.run ^TestRMN_NotEnoughObservers$ -timeout 12m -test.parallel=1 -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
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentSigners$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
Expand All @@ -1061,22 +1060,20 @@ runner-test-matrix:
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

# Enable after flaking issue is resolved
# - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughSigners$
# path: integration-tests/smoke/ccip/ccip_rmn_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 -test.run ^TestRMN_NotEnoughSigners$ -timeout 12m -test.parallel=1 -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
# E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
# E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughSigners$
path: integration-tests/smoke/ccip/ccip_rmn_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 -test.run ^TestRMN_NotEnoughSigners$ -timeout 12m -test.parallel=1 -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
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentRmnNodesForDifferentChains$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
Expand All @@ -1093,7 +1090,6 @@ runner-test-matrix:
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e


# END: CCIPv1.6 tests

# START: CCIP tests
Expand Down
22 changes: 8 additions & 14 deletions integration-tests/smoke/ccip/ccip_rmn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestRMN_MultipleMessagesOnOneLaneNoWaitForExec(t *testing.T) {
func TestRMN_NotEnoughObservers(t *testing.T) {
runRmnTestCase(t, rmnTestCase{
name: "one message but not enough observers, should not get a commit report",
passIfNoCommitAfter: time.Minute, // wait for a minute and assert that commit report was not delivered
passIfNoCommitAfter: 15 * time.Second,
homeChainConfig: homeChainConfig{
f: map[int]int{chain0: 1, chain1: 1},
},
Expand Down Expand Up @@ -120,7 +120,7 @@ func TestRMN_DifferentSigners(t *testing.T) {
func TestRMN_NotEnoughSigners(t *testing.T) {
runRmnTestCase(t, rmnTestCase{
name: "different signers and different observers",
passIfNoCommitAfter: time.Minute, // wait for a minute and assert that commit report was not delivered
passIfNoCommitAfter: 15 * time.Second,
homeChainConfig: homeChainConfig{
f: map[int]int{chain0: 1, chain1: 1},
},
Expand Down Expand Up @@ -176,6 +176,8 @@ const (
func runRmnTestCase(t *testing.T, tc rmnTestCase) {
require.NoError(t, os.Setenv("ENABLE_RMN", "true"))

ctx := testcontext.Get(t)

envWithRMN, rmnCluster := testsetups.NewLocalDevEnvironmentWithRMN(t, logger.TestLogger(t), len(tc.rmnNodes))
t.Logf("envWithRmn: %#v", envWithRMN)

Expand Down Expand Up @@ -241,9 +243,7 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
homeChainState, ok := onChainState.Chains[envWithRMN.HomeChainSel]
require.True(t, ok)

allDigests, err := homeChainState.RMNHome.GetConfigDigests(&bind.CallOpts{
Context: testcontext.Get(t),
})
allDigests, err := homeChainState.RMNHome.GetConfigDigests(&bind.CallOpts{Context: ctx})
require.NoError(t, err)

t.Logf("RMNHome candidateDigest before setting new candidate: %x, activeDigest: %x",
Expand All @@ -265,9 +265,7 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
_, err = deployment.ConfirmIfNoError(homeChain, tx, err)
require.NoError(t, err)

candidateDigest, err := homeChainState.RMNHome.GetCandidateDigest(&bind.CallOpts{
Context: testcontext.Get(t),
})
candidateDigest, err := homeChainState.RMNHome.GetCandidateDigest(&bind.CallOpts{Context: ctx})
require.NoError(t, err)

t.Logf("RMNHome candidateDigest after setting new candidate: %x", candidateDigest[:])
Expand All @@ -281,9 +279,7 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
require.NoError(t, err)

// check the active digest is the same as the candidate digest
activeDigest, err := homeChainState.RMNHome.GetActiveDigest(&bind.CallOpts{
Context: testcontext.Get(t),
})
activeDigest, err := homeChainState.RMNHome.GetActiveDigest(&bind.CallOpts{Context: ctx})
require.NoError(t, err)
require.Equalf(t, candidateDigest, activeDigest,
"active digest should be the same as the previously candidate digest after promotion, previous candidate: %x, active: %x",
Expand Down Expand Up @@ -312,9 +308,7 @@ func runRmnTestCase(t *testing.T, tc rmnTestCase) {
require.NoError(t, err2)

// confirm the config is set correctly
config, err2 := chState.RMNRemote.GetVersionedConfig(&bind.CallOpts{
Context: testcontext.Get(t),
})
config, err2 := chState.RMNRemote.GetVersionedConfig(&bind.CallOpts{Context: ctx})
require.NoError(t, err2)
require.Equalf(t,
activeDigest,
Expand Down

0 comments on commit a38ca78

Please sign in to comment.