-
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
chore(cre-deployment): lightweight changeset tests #16322
Conversation
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌2 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌2 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌2 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
@@ -275,6 +284,14 @@ func (n Nodes) DefaultF() uint8 { | |||
return uint8(len(n) / 3) | |||
} | |||
|
|||
func (n Nodes) IDs() []string { |
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.
convience
nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" | ||
"github.com/smartcontractkit/chainlink/deployment" | ||
"github.com/smartcontractkit/chainlink/deployment/environment/memory" | ||
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" | ||
) | ||
|
||
var _ node.NodeServiceServer = (*JDNodeService)(nil) | ||
var _ nodev1.NodeServiceClient = (*JDNodeService)(nil) |
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.
implement the entire OffchainClient interface so we can use this in an Environment
for tests
Name() string | ||
} | ||
|
||
var _ testDon = (*memoryDon)(nil) |
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.
these interface impls are the basic reason we can support either in-memory nodes or 'view-only' nodes
AssetDonConfig: test.DonConfig{N: 4}, | ||
WriterDonConfig: test.DonConfig{N: 4}, | ||
te := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ | ||
WFDonConfig: test.DonConfig{Name: "wfDon", N: 4}, |
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.
these all got a Name so the test framewok can be antagonistic to the details of the don in the new Get method
validateNodes(t, gotRegistry, cwNodes, expectedHashedCapabilities(t, gotRegistry, cwDon)) | ||
validateNodes(t, gotRegistry, assetNodes, expectedHashedCapabilities(t, gotRegistry, assetDon)) | ||
require.Len(t, gotNodes, len(dons.P2PIDs())) | ||
validateNodes(t, gotRegistry, dons.Get(c.WFDonConfig.Name), expectedHashedCapabilities(t, gotRegistry, wfDonCapabilities)) |
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.
all these call changed so we can provide the dons
interface rather than directly access state about the kind of test env we have in our hands
chains, | ||
nil, | ||
dons.NodeList().IDs(), | ||
envtest.NewJDService(dons.NodeList()), |
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 where we are using the new JD test impl
CSAKey: n.Keys.CSA.ID(), | ||
PeerID: n.Keys.PeerID, | ||
AdminAddr: admin, | ||
MultiAddr: n.Addr.String(), |
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.
is this multiaddress correct? Should it not be node's p2p listen address?
PeerId: n.Keys.PeerID.String(), | ||
}, | ||
OcrKeyBundle: keyBundle, | ||
Multiaddr: n.Addr.String(), |
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.
same question
}, | ||
OcrKeyBundle: keyBundle, | ||
Multiaddr: n.Addr.String(), | ||
Plugins: nil, |
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.
okay to have nil plugins here? For CCIP I know in real node we have commit execute plugin enabled
60d68b7
to
39b7cba
Compare
39b7cba
to
04cb25e
Compare
|
CRE-299
Enable lighter weight ChangeSet testing. 5x speed up of go test deployment/keystone/... b/c the majority of our tests don't need real in memory nodes
Fleshing out the test.JDNodeService will also let us write tests in the CLD repo without relying on phony in memory nodes nor the real JD instances
Requires
Supports