-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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-4014 enable rmn tests in ci #15276
Changes from 11 commits
ba9a204
c497d80
1f42a13
b223d99
324ee54
75e4b65
e2d38c2
a90a6f2
d654ede
694cb79
66c7426
c1d1dfe
52309d8
20a554a
1898903
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ import ( | |
jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" | ||
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/osutil" | ||
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" | ||
|
||
"github.com/smartcontractkit/chainlink/deployment" | ||
ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip" | ||
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home" | ||
|
@@ -26,10 +27,8 @@ import ( | |
"github.com/smartcontractkit/chainlink/v2/core/logger" | ||
) | ||
|
||
// Set false to run the RMN tests | ||
const skipRmnTest = true | ||
|
||
func TestRMN_TwoMessagesOnTwoLanes(t *testing.T) { | ||
t.Parallel() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tried parallel at first did not work. can remove it |
||
runRmnTestCase(t, rmnTestCase{ | ||
name: "messages on two lanes", | ||
waitForExec: true, | ||
|
@@ -53,6 +52,7 @@ func TestRMN_TwoMessagesOnTwoLanes(t *testing.T) { | |
} | ||
|
||
func TestRMN_MultipleMessagesOnOneLaneNoWaitForExec(t *testing.T) { | ||
t.Parallel() | ||
runRmnTestCase(t, rmnTestCase{ | ||
name: "multiple messages for rmn batching inspection and one rmn node down", | ||
waitForExec: false, // do not wait for execution reports | ||
|
@@ -75,6 +75,7 @@ func TestRMN_MultipleMessagesOnOneLaneNoWaitForExec(t *testing.T) { | |
} | ||
|
||
func TestRMN_NotEnoughObservers(t *testing.T) { | ||
t.Parallel() | ||
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 | ||
|
@@ -97,6 +98,7 @@ func TestRMN_NotEnoughObservers(t *testing.T) { | |
} | ||
|
||
func TestRMN_DifferentSigners(t *testing.T) { | ||
t.Parallel() | ||
runRmnTestCase(t, rmnTestCase{ | ||
name: "different signers and different observers", | ||
homeChainConfig: homeChainConfig{ | ||
|
@@ -121,6 +123,7 @@ func TestRMN_DifferentSigners(t *testing.T) { | |
} | ||
|
||
func TestRMN_NotEnoughSigners(t *testing.T) { | ||
t.Parallel() | ||
runRmnTestCase(t, rmnTestCase{ | ||
name: "different signers and different observers", | ||
passIfNoCommitAfter: time.Minute, // wait for a minute and assert that commit report was not delivered | ||
|
@@ -146,6 +149,7 @@ func TestRMN_NotEnoughSigners(t *testing.T) { | |
} | ||
|
||
func TestRMN_DifferentRmnNodesForDifferentChains(t *testing.T) { | ||
t.Parallel() | ||
runRmnTestCase(t, rmnTestCase{ | ||
name: "different rmn nodes support different chains", | ||
waitForExec: false, | ||
|
@@ -177,9 +181,6 @@ const ( | |
) | ||
|
||
func runRmnTestCase(t *testing.T, tc rmnTestCase) { | ||
if skipRmnTest { | ||
t.Skip("Local only") | ||
} | ||
require.NoError(t, os.Setenv("ENABLE_RMN", "true")) | ||
|
||
envWithRMN, rmnCluster := testsetups.NewLocalDevEnvironmentWithRMN(t, logger.TestLogger(t), len(tc.rmnNodes)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,16 @@ import ( | |
) | ||
|
||
const ( | ||
E2E_JD_IMAGE = "E2E_JD_IMAGE" | ||
E2E_JD_VERSION = "E2E_JD_VERSION" | ||
E2E_JD_GRPC = "E2E_JD_GRPC" | ||
E2E_JD_WSRPC = "E2E_JD_WSRPC" | ||
DEFAULT_DB_NAME = "JD_DB" | ||
DEFAULT_DB_VERSION = "14.1" | ||
E2E_JD_IMAGE = "E2E_JD_IMAGE" | ||
E2E_JD_VERSION = "E2E_JD_VERSION" | ||
E2E_JD_GRPC = "E2E_JD_GRPC" | ||
E2E_JD_WSRPC = "E2E_JD_WSRPC" | ||
DEFAULT_DB_NAME = "JD_DB" | ||
DEFAULT_DB_VERSION = "14.1" | ||
E2E_RMN_RAGEPROXY_IMAGE = "E2E_RMN_RAGEPROXY_IMAGE" | ||
E2E_RMN_RAGEPROXY_VERSION = "E2E_RMN_RAGEPROXY_VERSION" | ||
E2E_RMN_AFN2PROXY_IMAGE = "E2E_RMN_AFN2PROXY_IMAGE" | ||
E2E_RMN_AFN2PROXY_VERSION = "E2E_RMN_AFN2PROXY_VERSION" | ||
) | ||
|
||
var ( | ||
|
@@ -45,6 +49,38 @@ type RMNConfig struct { | |
AFNVersion *string `toml:",omitempty"` | ||
} | ||
|
||
func (r *RMNConfig) GetProxyImage() string { | ||
image := pointer.GetString(r.ProxyImage) | ||
if image == "" { | ||
return ctfconfig.MustReadEnvVar_String(E2E_RMN_RAGEPROXY_IMAGE) | ||
} | ||
return image | ||
} | ||
|
||
func (r *RMNConfig) GetProxyVersion() string { | ||
version := pointer.GetString(r.ProxyVersion) | ||
if version == "" { | ||
return ctfconfig.MustReadEnvVar_String(E2E_RMN_RAGEPROXY_VERSION) | ||
} | ||
return version | ||
} | ||
|
||
func (r *RMNConfig) GetAFNImage() string { | ||
image := pointer.GetString(r.AFNImage) | ||
if image == "" { | ||
return ctfconfig.MustReadEnvVar_String(E2E_RMN_AFN2PROXY_IMAGE) | ||
} | ||
return image | ||
} | ||
|
||
func (r *RMNConfig) GetAFNVersion() string { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we align with a new naming? I guess no one remembers what AFN was :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The image name is AFN2Proxy https://github.com/smartcontractkit/rmn-v2-test-infra/tree/master/docker/afn2proxy |
||
version := pointer.GetString(r.AFNVersion) | ||
if version == "" { | ||
return ctfconfig.MustReadEnvVar_String(E2E_RMN_AFN2PROXY_VERSION) | ||
} | ||
return version | ||
} | ||
|
||
type NodeConfig struct { | ||
NoOfPluginNodes *int `toml:",omitempty"` | ||
NoOfBootstraps *int `toml:",omitempty"` | ||
|
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.
I see a test like this in the repo, why do we comment it out?
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.
This is currently failing @dimkouv is working on a PR to fix this. After that we will uncomment this