Skip to content

Commit

Permalink
Update to CTF 1.20.1 (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmci authored Dec 6, 2023
2 parents 4b8569f + c1f9479 commit 7a77727
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
9 changes: 6 additions & 3 deletions integration-tests/docker/test_env/cl_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ func WithLogWatch(lw *logwatch.LogWatch) ClNodeOption {
}
}

func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *chainlink.Config, opts ...ClNodeOption) *ClNode {
func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *chainlink.Config, opts ...ClNodeOption) (*ClNode, error) {
nodeDefaultCName := fmt.Sprintf("%s-%s", "cl-node", uuid.NewString()[0:8])
pgDefaultCName := fmt.Sprintf("pg-%s", nodeDefaultCName)
pgDb := test_env.NewPostgresDb(networks, test_env.WithPostgresDbContainerName(pgDefaultCName))
pgDb, err := test_env.NewPostgresDb(networks, test_env.WithPostgresDbContainerName(pgDefaultCName))
if err != nil {
return nil, err
}
n := &ClNode{
EnvComponent: test_env.EnvComponent{
ContainerName: nodeDefaultCName,
Expand All @@ -102,7 +105,7 @@ func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *ch
for _, opt := range opts {
opt(n)
}
return n
return n, nil
}

func (n *ClNode) SetTestLogger(t *testing.T) {
Expand Down
10 changes: 6 additions & 4 deletions integration-tests/docker/test_env/test_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,17 @@ func (te *CLClusterTestEnv) StartMockAdapter() error {
return te.MockAdapter.StartContainer()
}

func (te *CLClusterTestEnv) StartClCluster(nodeConfig *chainlink.Config, count int, secretsConfig string) error {
func (te *CLClusterTestEnv) StartClCluster(nodeConfig *chainlink.Config, count int, secretsConfig string, opts ...ClNodeOption) error {
if te.Cfg != nil && te.Cfg.ClCluster != nil {
te.ClCluster = te.Cfg.ClCluster
} else {
opts = append(opts, WithSecrets(secretsConfig))
te.ClCluster = &ClCluster{}
for i := 0; i < count; i++ {
ocrNode := NewClNode([]string{te.Network.Name}, os.Getenv("CHAINLINK_IMAGE"), os.Getenv("CHAINLINK_VERSION"), nodeConfig,
WithSecrets(secretsConfig),
)
ocrNode, err := NewClNode([]string{te.Network.Name}, os.Getenv("CHAINLINK_IMAGE"), os.Getenv("CHAINLINK_VERSION"), nodeConfig, opts...)
if err != nil {
return err
}
te.ClCluster.Nodes = append(te.ClCluster.Nodes, ocrNode)
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chain-selectors v1.0.5
github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e
github.com/smartcontractkit/chainlink-testing-framework v1.19.7-0.20231128215954-11362fc02bc5
github.com/smartcontractkit/chainlink-testing-framework v1.20.1
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20231107151413-13e0202ae8d7
github.com/smartcontractkit/ocr2keepers v0.7.28
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2382,8 +2382,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231023133638-72f4e799ab0
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231023133638-72f4e799ab05/go.mod h1:o0Pn1pbaUluboaK6/yhf8xf7TiFCkyFl6WUOdwqamuU=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231024133459-1ef3a11319eb h1:HiluOfEVGOQTM6BTDImOqYdMZZ7qq7fkZ3TJdmItNr8=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231024133459-1ef3a11319eb/go.mod h1:/30flFG4L/iCYAFeA3DUzR0xuHSxAMONiWTzyzvsNwo=
github.com/smartcontractkit/chainlink-testing-framework v1.19.7-0.20231128215954-11362fc02bc5 h1:Vftq/fSamVFQcuU+U/3PXeRo5PM8JBGY/l9TJTQrRIA=
github.com/smartcontractkit/chainlink-testing-framework v1.19.7-0.20231128215954-11362fc02bc5/go.mod h1:+FVgkz6phTc+piVT57AcQfr3I8xvZgZ1lOpRPOu/dLQ=
github.com/smartcontractkit/chainlink-testing-framework v1.20.1 h1:0hxLRts4yIum52MaE95RuM2Xi1S/R0r4UFExpp00iK4=
github.com/smartcontractkit/chainlink-testing-framework v1.20.1/go.mod h1:+FVgkz6phTc+piVT57AcQfr3I8xvZgZ1lOpRPOu/dLQ=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
Expand Down

0 comments on commit 7a77727

Please sign in to comment.