Skip to content

Commit

Permalink
[CAPPL-303] Add commands to deploy the workflow registry
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-cordenier committed Dec 17, 2024
1 parent b76f9b3 commit 03c3bb2
Show file tree
Hide file tree
Showing 19 changed files with 754 additions and 462 deletions.
19 changes: 10 additions & 9 deletions deployment/keystone/changeset/append_node_capabilities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset"
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/keystone/changeset"
"github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test"
kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey"
)
Expand All @@ -29,10 +30,10 @@ func TestAppendNodeCapabilities(t *testing.T) {
caps = []kcr.CapabilitiesRegistryCapability{capA, capB}
)
t.Run("no mcms", func(t *testing.T) {
te := SetupTestEnv(t, TestConfig{
WFDonConfig: DonConfig{N: 4},
AssetDonConfig: DonConfig{N: 4},
WriterDonConfig: DonConfig{N: 4},
te := test.SetupTestEnv(t, test.TestConfig{
WFDonConfig: test.DonConfig{N: 4},
AssetDonConfig: test.DonConfig{N: 4},
WriterDonConfig: test.DonConfig{N: 4},
NumChains: 1,
})

Expand All @@ -58,10 +59,10 @@ func TestAppendNodeCapabilities(t *testing.T) {
})
})
t.Run("with mcms", func(t *testing.T) {
te := SetupTestEnv(t, TestConfig{
WFDonConfig: DonConfig{N: 4},
AssetDonConfig: DonConfig{N: 4},
WriterDonConfig: DonConfig{N: 4},
te := test.SetupTestEnv(t, test.TestConfig{
WFDonConfig: test.DonConfig{N: 4},
AssetDonConfig: test.DonConfig{N: 4},
WriterDonConfig: test.DonConfig{N: 4},
NumChains: 1,
UseMCMS: true,
})
Expand Down Expand Up @@ -108,7 +109,7 @@ func TestAppendNodeCapabilities(t *testing.T) {
}

// validateUpdate checks reads nodes from the registry and checks they have the expected updates
func validateCapabilityAppends(t *testing.T, te TestEnv, appended map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability) {
func validateCapabilityAppends(t *testing.T, te test.TestEnv, appended map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability) {
registry := te.ContractSets()[te.RegistrySelector].CapabilitiesRegistry
wfP2PIDs := p2pIDs(t, maps.Keys(te.WFNodes))
nodes, err := registry.GetNodesByP2PIds(nil, wfP2PIDs)
Expand Down
17 changes: 9 additions & 8 deletions deployment/keystone/changeset/deploy_forwarder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/smartcontractkit/chainlink/deployment/common/proposalutils"
"github.com/smartcontractkit/chainlink/deployment/environment/memory"
"github.com/smartcontractkit/chainlink/deployment/keystone/changeset"
"github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test"
)

func TestDeployForwarder(t *testing.T) {
Expand Down Expand Up @@ -56,10 +57,10 @@ func TestConfigureForwarders(t *testing.T) {
for _, nChains := range []int{1, 3} {
name := fmt.Sprintf("nChains=%d", nChains)
t.Run(name, func(t *testing.T) {
te := SetupTestEnv(t, TestConfig{
WFDonConfig: DonConfig{N: 4},
AssetDonConfig: DonConfig{N: 4},
WriterDonConfig: DonConfig{N: 4},
te := test.SetupTestEnv(t, test.TestConfig{
WFDonConfig: test.DonConfig{N: 4},
AssetDonConfig: test.DonConfig{N: 4},
WriterDonConfig: test.DonConfig{N: 4},
NumChains: nChains,
})

Expand Down Expand Up @@ -93,10 +94,10 @@ func TestConfigureForwarders(t *testing.T) {
for _, nChains := range []int{1, 3} {
name := fmt.Sprintf("nChains=%d", nChains)
t.Run(name, func(t *testing.T) {
te := SetupTestEnv(t, TestConfig{
WFDonConfig: DonConfig{N: 4},
AssetDonConfig: DonConfig{N: 4},
WriterDonConfig: DonConfig{N: 4},
te := test.SetupTestEnv(t, test.TestConfig{
WFDonConfig: test.DonConfig{N: 4},
AssetDonConfig: test.DonConfig{N: 4},
WriterDonConfig: test.DonConfig{N: 4},
NumChains: nChains,
UseMCMS: true,
})
Expand Down
17 changes: 9 additions & 8 deletions deployment/keystone/changeset/deploy_ocr3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/smartcontractkit/chainlink/deployment/environment/memory"
kslib "github.com/smartcontractkit/chainlink/deployment/keystone"
"github.com/smartcontractkit/chainlink/deployment/keystone/changeset"
"github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test"
)

func TestDeployOCR3(t *testing.T) {
Expand Down Expand Up @@ -54,10 +55,10 @@ func TestConfigureOCR3(t *testing.T) {

t.Run("no mcms", func(t *testing.T) {

te := SetupTestEnv(t, TestConfig{
WFDonConfig: DonConfig{N: 4},
AssetDonConfig: DonConfig{N: 4},
WriterDonConfig: DonConfig{N: 4},
te := test.SetupTestEnv(t, test.TestConfig{
WFDonConfig: test.DonConfig{N: 4},
AssetDonConfig: test.DonConfig{N: 4},
WriterDonConfig: test.DonConfig{N: 4},
NumChains: 1,
})

Expand Down Expand Up @@ -85,10 +86,10 @@ func TestConfigureOCR3(t *testing.T) {
})

t.Run("mcms", func(t *testing.T) {
te := SetupTestEnv(t, TestConfig{
WFDonConfig: DonConfig{N: 4},
AssetDonConfig: DonConfig{N: 4},
WriterDonConfig: DonConfig{N: 4},
te := test.SetupTestEnv(t, test.TestConfig{
WFDonConfig: test.DonConfig{N: 4},
AssetDonConfig: test.DonConfig{N: 4},
WriterDonConfig: test.DonConfig{N: 4},
NumChains: 1,
UseMCMS: true,
})
Expand Down
Loading

0 comments on commit 03c3bb2

Please sign in to comment.