diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index 1b18b9f6ab7..c292c130c5a 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -42,7 +42,7 @@ AnnounceAddresses = ["0.0.0.0:6690"] ListenAddresses = ["0.0.0.0:6690"]` defaultAutomationSettings = map[string]interface{}{ - "replicas": "6", + "replicas": 6, "toml": client.AddNetworksConfig(baseTOML, networks.SelectedNetwork), "db": map[string]interface{}{ "stateful": true, @@ -194,11 +194,11 @@ func TestAutomationChaos(t *testing.T) { return } - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 1, 2, ChaosGroupMinority) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 1, 2, ChaosGroupMinority) require.NoError(t, err) - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 3, 5, ChaosGroupMajority) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 3, 5, ChaosGroupMajority) require.NoError(t, err) - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 2, 5, ChaosGroupMajorityPlus) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 2, 5, ChaosGroupMajorityPlus) require.NoError(t, err) chainClient, err := blockchain.NewEVMClient(network, testEnvironment, l) diff --git a/integration-tests/chaos/ocr2vrf_chaos_test.go b/integration-tests/chaos/ocr2vrf_chaos_test.go index fd51fa55db5..1d7f61f783c 100644 --- a/integration-tests/chaos/ocr2vrf_chaos_test.go +++ b/integration-tests/chaos/ocr2vrf_chaos_test.go @@ -34,7 +34,7 @@ func TestOCR2VRFChaos(t *testing.T) { loadedNetwork := networks.SelectedNetwork defaultOCR2VRFSettings := map[string]interface{}{ - "replicas": "6", + "replicas": 6, "toml": client.AddNetworkDetailedConfig( config.BaseOCR2Config, config.DefaultOCR2VRFNetworkDetailTomlConfig, @@ -135,9 +135,9 @@ func TestOCR2VRFChaos(t *testing.T) { return } - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 1, 2, ChaosGroupMinority) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 1, 2, ChaosGroupMinority) require.NoError(t, err) - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 3, 5, ChaosGroupMajority) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 3, 5, ChaosGroupMajority) require.NoError(t, err) chainClient, err := blockchain.NewEVMClient(testNetwork, testEnvironment, l) diff --git a/integration-tests/chaos/ocr_chaos_test.go b/integration-tests/chaos/ocr_chaos_test.go index 569a0d1b70c..f3ee12046fb 100644 --- a/integration-tests/chaos/ocr_chaos_test.go +++ b/integration-tests/chaos/ocr_chaos_test.go @@ -32,7 +32,7 @@ import ( var ( defaultOCRSettings = map[string]interface{}{ - "replicas": "6", + "replicas": 6, "db": map[string]interface{}{ "stateful": true, "capacity": "1Gi", @@ -146,11 +146,11 @@ func TestOCRChaos(t *testing.T) { return } - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 1, 2, ChaosGroupMinority) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 1, 2, ChaosGroupMinority) require.NoError(t, err) - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 3, 5, ChaosGroupMajority) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 3, 5, ChaosGroupMajority) require.NoError(t, err) - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=", 2, 5, ChaosGroupMajorityPlus) + err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 2, 5, ChaosGroupMajorityPlus) require.NoError(t, err) chainClient, err := blockchain.NewEVMClient(blockchain.SimulatedEVMNetwork, testEnvironment, l) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 9aa09350013..ded6216b540 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -19,7 +19,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 - github.com/smartcontractkit/chainlink-env v0.36.0 + github.com/smartcontractkit/chainlink-env v0.38.0 github.com/smartcontractkit/chainlink-testing-framework v1.17.0 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20230922131214-122accb19ea6 @@ -447,15 +447,15 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect golang.org/x/arch v0.4.0 // indirect - golang.org/x/crypto v0.12.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index bd4a8b977c0..90e85c816cd 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -2358,8 +2358,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8= -github.com/smartcontractkit/chainlink-env v0.36.0 h1:CFOjs0c0y3lrHi/fl5qseCH9EQa5W/6CFyOvmhe2VnA= -github.com/smartcontractkit/chainlink-env v0.36.0/go.mod h1:NbRExHmJGnKSYXmvNuJx5VErSx26GtE1AEN/CRzYOg8= +github.com/smartcontractkit/chainlink-env v0.38.0 h1:3LaqV5wSRCVPK0haV5jC2zdZITV2Q0BPyUMUM3tyJ7o= +github.com/smartcontractkit/chainlink-env v0.38.0/go.mod h1:ICN9gOBY+NehK8mIxxM9CrWDohgkCQ1vgX9FazCbg8I= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230926113942-a871b2976dc1 h1:Db333w+fSm2e18LMikcIQHIZqgxZruW9uCUGJLUC9mI= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230926113942-a871b2976dc1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE= @@ -2703,8 +2703,8 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2852,8 +2852,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -3032,8 +3032,9 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -3044,8 +3045,8 @@ golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3061,8 +3062,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/integration-tests/performance/cron_test.go b/integration-tests/performance/cron_test.go index c66a1803564..b5fc9c48b09 100644 --- a/integration-tests/performance/cron_test.go +++ b/integration-tests/performance/cron_test.go @@ -120,10 +120,11 @@ func setupCronTest(t *testing.T) (testEnvironment *environment.Environment) { } baseTOML := `[WebServer] HTTPWriteTimout = '300s'` - cd, err := chainlink.NewDeployment(1, map[string]interface{}{ - "toml": client.AddNetworksConfig(baseTOML, network), + cd := chainlink.New(0, map[string]interface{}{ + "replicas": 1, + "toml": client.AddNetworksConfig(baseTOML, network), }) - require.NoError(t, err, "Error creating chainlink deployment") + testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("performance-cron-%s", strings.ReplaceAll(strings.ToLower(network.Name), " ", "-")), Test: t, @@ -131,8 +132,8 @@ HTTPWriteTimout = '300s'` AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). AddHelm(evmConfig). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error launching test environment") return testEnvironment } diff --git a/integration-tests/performance/directrequest_test.go b/integration-tests/performance/directrequest_test.go index 98c03c2bb96..1b3009043fd 100644 --- a/integration-tests/performance/directrequest_test.go +++ b/integration-tests/performance/directrequest_test.go @@ -140,10 +140,11 @@ func setupDirectRequestTest(t *testing.T) (testEnvironment *environment.Environm } baseTOML := `[WebServer] HTTPWriteTimout = '300s'` - cd, err := chainlink.NewDeployment(1, map[string]interface{}{ - "toml": client.AddNetworksConfig(baseTOML, network), + cd := chainlink.New(0, map[string]interface{}{ + "replicas": 1, + "toml": client.AddNetworksConfig(baseTOML, network), }) - require.NoError(t, err, "Error creating chainlink deployment") + testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("performance-cron-%s", strings.ReplaceAll(strings.ToLower(network.Name), " ", "-")), Test: t, @@ -151,8 +152,8 @@ HTTPWriteTimout = '300s'` AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). AddHelm(evmConfig). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error launching test environment") return testEnvironment } diff --git a/integration-tests/performance/flux_test.go b/integration-tests/performance/flux_test.go index 2c33096a356..5ca5ae80962 100644 --- a/integration-tests/performance/flux_test.go +++ b/integration-tests/performance/flux_test.go @@ -187,10 +187,11 @@ HTTPWriteTimout = '300s' [OCR] Enabled = true` - cd, err := chainlink.NewDeployment(3, map[string]interface{}{ - "toml": client.AddNetworksConfig(baseTOML, testNetwork), + cd := chainlink.New(0, map[string]interface{}{ + "replicas": 3, + "toml": client.AddNetworksConfig(baseTOML, testNetwork), }) - require.NoError(t, err, "Error creating chainlink deployment") + testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("performance-flux-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-")), Test: t, @@ -198,8 +199,8 @@ Enabled = true` AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). AddHelm(evmConf). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error running test environment") return testEnvironment, testNetwork } diff --git a/integration-tests/performance/keeper_test.go b/integration-tests/performance/keeper_test.go index 7ab0f53d0d0..e1ffecd28c4 100644 --- a/integration-tests/performance/keeper_test.go +++ b/integration-tests/performance/keeper_test.go @@ -153,10 +153,11 @@ TurnLookBack = 0 SyncInterval = '5s' PerformGasOverhead = 150_000` networkName := strings.ReplaceAll(strings.ToLower(network.Name), " ", "-") - cd, err := chainlink.NewDeployment(5, map[string]interface{}{ - "toml": client.AddNetworksConfig(baseTOML, network), + cd := chainlink.New(0, map[string]interface{}{ + "replicas": 5, + "toml": client.AddNetworksConfig(baseTOML, network), }) - require.NoError(t, err, "Error creating chainlink deployment") + testEnvironment := environment.New( &environment.Config{ NamespacePrefix: fmt.Sprintf("performance-keeper-%s-%s", testName, networkName), @@ -166,8 +167,8 @@ PerformGasOverhead = 150_000` AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). AddHelm(evmConfig). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error deploying test environment") if testEnvironment.WillUseRemoteRunner() { return testEnvironment, nil, nil, nil, nil diff --git a/integration-tests/performance/ocr_test.go b/integration-tests/performance/ocr_test.go index d3d29049653..3df0700c6ea 100644 --- a/integration-tests/performance/ocr_test.go +++ b/integration-tests/performance/ocr_test.go @@ -107,10 +107,11 @@ Enabled = true Enabled = true ListenIP = '0.0.0.0' ListenPort = 6690` - cd, err := chainlink.NewDeployment(6, map[string]interface{}{ - "toml": client.AddNetworksConfig(baseTOML, testNetwork), + cd := chainlink.New(0, map[string]interface{}{ + "replicas": 6, + "toml": client.AddNetworksConfig(baseTOML, testNetwork), }) - require.NoError(t, err, "Error creating chainlink deployment") + testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("performance-ocr-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-")), Test: t, @@ -118,8 +119,8 @@ ListenPort = 6690` AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). AddHelm(evmConfig). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error running test environment") return testEnvironment, testNetwork } diff --git a/integration-tests/performance/vrf_test.go b/integration-tests/performance/vrf_test.go index af3a3ecba81..4f86c6585bd 100644 --- a/integration-tests/performance/vrf_test.go +++ b/integration-tests/performance/vrf_test.go @@ -146,17 +146,17 @@ func setupVRFTest(t *testing.T) (testEnvironment *environment.Environment, testN } baseTOML := `[WebServer] HTTPWriteTimout = '300s'` - cd, err := chainlink.NewDeployment(0, map[string]interface{}{ + cd := chainlink.New(0, map[string]interface{}{ "toml": client.AddNetworksConfig(baseTOML, testNetwork), }) - require.NoError(t, err, "Error creating chainlink deployment") + testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("smoke-vrf-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-")), Test: t, }). AddHelm(evmConfig). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error running test environment") return testEnvironment, testNetwork } diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index ab439e59f29..2f8db75f749 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -77,7 +77,7 @@ LimitDefault = 5_000_000` "networkId": "1337", }, "miner": map[string]interface{}{ - "replicas": "2", + "replicas": 2, }, }, }, @@ -126,9 +126,9 @@ const ( func TestAutomationReorg(t *testing.T) { l := logging.GetTestLogger(t) network := networks.SelectedNetwork + defaultAutomationSettings["replicas"] = numberOfNodes + cd := chainlink.New(0, defaultAutomationSettings) - cd, err := chainlink.NewDeployment(numberOfNodes, defaultAutomationSettings) - require.NoError(t, err, "Error creating chainlink deployment") testEnvironment := environment. New(&environment.Config{ NamespacePrefix: fmt.Sprintf("automation-reorg-%d", automationReorgBlocks), @@ -139,8 +139,8 @@ func TestAutomationReorg(t *testing.T) { Name: "geth-blockscout", WsURL: activeEVMNetwork.URL, HttpURL: activeEVMNetwork.HTTPURLs[0]})). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error setting up test environment") if testEnvironment.WillUseRemoteRunner() { diff --git a/integration-tests/reorg/reorg_test.go b/integration-tests/reorg/reorg_test.go index 5666d8c7540..74468b92536 100644 --- a/integration-tests/reorg/reorg_test.go +++ b/integration-tests/reorg/reorg_test.go @@ -125,11 +125,12 @@ func TestDirectRequestReorg(t *testing.T) { time.Sleep(90 * time.Second) activeEVMNetwork = networks.SimulatedEVMNonDev netCfg := fmt.Sprintf(networkDRTOML, EVMFinalityDepth, EVMTrackerHistoryDepth) - chainlinkDeployment, err := chainlink.NewDeployment(1, map[string]interface{}{ - "toml": client.AddNetworkDetailedConfig(baseDRTOML, netCfg, activeEVMNetwork), + chainlinkDeployment := chainlink.New(0, map[string]interface{}{ + "replicas": 1, + "toml": client.AddNetworkDetailedConfig(baseDRTOML, netCfg, activeEVMNetwork), }) - require.NoError(t, err, "Error building Chainlink deployment") - err = testEnvironment.AddHelmCharts(chainlinkDeployment).Run() + + err = testEnvironment.AddHelm(chainlinkDeployment).Run() require.NoError(t, err, "Error adding to test environment") chainClient, err := blockchain.NewEVMClient(networkSettings, testEnvironment, l) diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index a1ad9fa5296..c6804e48d01 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -126,10 +126,10 @@ func setupOCR2Test(t *testing.T, forwardersEnabled bool) ( toml = client.AddNetworksConfig(config.BaseOCR2Config, testNetwork) } - chainlinkChart, err := chainlink.NewDeployment(6, map[string]interface{}{ - "toml": toml, + chainlinkChart := chainlink.New(0, map[string]interface{}{ + "replicas": 6, + "toml": toml, }) - require.NoError(t, err, "Error creating chainlink deployment") testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("smoke-ocr2-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-")), @@ -138,8 +138,8 @@ func setupOCR2Test(t *testing.T, forwardersEnabled bool) ( AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). AddHelm(evmConfig). - AddHelmCharts(chainlinkChart) - err = testEnvironment.Run() + AddHelm(chainlinkChart) + err := testEnvironment.Run() require.NoError(t, err, "Error running test environment") return testEnvironment, testNetwork } diff --git a/integration-tests/smoke/ocr2vrf_test.go b/integration-tests/smoke/ocr2vrf_test.go index c9f689ca7ae..81488639187 100644 --- a/integration-tests/smoke/ocr2vrf_test.go +++ b/integration-tests/smoke/ocr2vrf_test.go @@ -159,21 +159,22 @@ func setupOCR2VRFEnvironment(t *testing.T) (testEnvironment *environment.Environ }) } - cd, err := chainlink.NewDeployment(6, map[string]interface{}{ + cd := chainlink.New(0, map[string]interface{}{ + "replicas": 6, "toml": client.AddNetworkDetailedConfig( config.BaseOCR2Config, config.DefaultOCR2VRFNetworkDetailTomlConfig, testNetwork, ), }) - require.NoError(t, err, "Error creating Chainlink deployment") + testEnvironment = environment.New(&environment.Config{ NamespacePrefix: fmt.Sprintf("smoke-ocr2vrf-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-")), Test: t, }). AddHelm(evmConfig). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(t, err, "Error running test environment") diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index 259831189db..b53fe9a7978 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -136,13 +136,14 @@ func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string) { Test: o.t, } - cd, err := chainlink.NewDeployment(6, map[string]any{ - "toml": client.AddNetworkDetailedConfig(config.BaseOCRP2PV1Config, customChainlinkNetworkTOML, network), + cd := chainlink.New(0, map[string]any{ + "replicas": 6, + "toml": client.AddNetworkDetailedConfig(config.BaseOCRP2PV1Config, customChainlinkNetworkTOML, network), "db": map[string]any{ "stateful": true, // stateful DB by default for soak tests }, }) - require.NoError(o.t, err, "Error creating chainlink deployment") + testEnvironment := environment.New(baseEnvironmentConfig). AddHelm(mockservercfg.New(nil)). AddHelm(mockserver.New(nil)). @@ -151,8 +152,8 @@ func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string) { Simulated: network.Simulated, WsURLs: network.URLs, })). - AddHelmCharts(cd) - err = testEnvironment.Run() + AddHelm(cd) + err := testEnvironment.Run() require.NoError(o.t, err, "Error launching test environment") o.testEnvironment = testEnvironment o.namespace = testEnvironment.Cfg.Namespace