Skip to content

Commit

Permalink
Bump chainlink-testing-framework to remove secret config keys from te…
Browse files Browse the repository at this point in the history
…st configs and BASE64_NETWORK_CONFIG env (#14303)

* Bump ctf

* fix lint

* Fix test

* bump
  • Loading branch information
lukaszcl authored Sep 2, 2024
1 parent fc84537 commit 702fe12
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 25 deletions.
4 changes: 0 additions & 4 deletions integration-tests/ccip-tests/testconfig/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,6 @@ func (p *Common) Validate() error {
// read the default network config, if specified
p.Network.UpperCaseNetworkNames()
p.Network.OverrideURLsAndKeysFromEVMNetwork()
err := p.Network.Default()
if err != nil {
return fmt.Errorf("error reading default network config %w", err)
}
if err := p.Network.Validate(); err != nil {
return fmt.Errorf("error validating networks config %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.21
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240829145110-4a45c426fbe8
github.com/smartcontractkit/chainlink-testing-framework v1.34.10
github.com/smartcontractkit/chainlink-testing-framework v1.35.0
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.1
github.com/smartcontractkit/chainlink-testing-framework/havoc v0.1.0
github.com/smartcontractkit/chainlink-testing-framework/seth v1.2.1
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1437,8 +1437,8 @@ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240821170223-a2f5c39f457
github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240821170223-a2f5c39f457f/go.mod h1:Ml88TJTwZCj6yHDkAEN/EhxVutzSlk+kDZgfibRIqF0=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
github.com/smartcontractkit/chainlink-testing-framework v1.34.10 h1:7boGJr/wkX5TF6TBb4wRnP6t1IFL6RD98+fZBJBZyCY=
github.com/smartcontractkit/chainlink-testing-framework v1.34.10/go.mod h1:ekYJbRAxXcs/YgOjHsY9/tlvDvXzv3lxcZK2eFUZduc=
github.com/smartcontractkit/chainlink-testing-framework v1.35.0 h1:5FzS4YOwzjRe59VMM7MmEyjgJCq4/aXR1fzdEJEPiL8=
github.com/smartcontractkit/chainlink-testing-framework v1.35.0/go.mod h1:ekYJbRAxXcs/YgOjHsY9/tlvDvXzv3lxcZK2eFUZduc=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.1 h1:1/r1wQZ4TOFpZ13w94r7amdF096Z96RuEnkOmrz1BGE=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.1/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU=
github.com/smartcontractkit/chainlink-testing-framework/havoc v0.1.0 h1:eHsvf2SklyyZ5fTHJIsIZ3eUnfO0TJU2BSZ7j8kLvzM=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/load/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240829145110-4a45c426fbe8
github.com/smartcontractkit/chainlink-testing-framework v1.34.10
github.com/smartcontractkit/chainlink-testing-framework v1.35.0
github.com/smartcontractkit/chainlink-testing-framework/seth v1.2.1
github.com/smartcontractkit/chainlink-testing-framework/wasp v0.4.10
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/load/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1407,8 +1407,8 @@ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240821170223-a2f5c39f457
github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240821170223-a2f5c39f457f/go.mod h1:Ml88TJTwZCj6yHDkAEN/EhxVutzSlk+kDZgfibRIqF0=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
github.com/smartcontractkit/chainlink-testing-framework v1.34.10 h1:7boGJr/wkX5TF6TBb4wRnP6t1IFL6RD98+fZBJBZyCY=
github.com/smartcontractkit/chainlink-testing-framework v1.34.10/go.mod h1:ekYJbRAxXcs/YgOjHsY9/tlvDvXzv3lxcZK2eFUZduc=
github.com/smartcontractkit/chainlink-testing-framework v1.35.0 h1:5FzS4YOwzjRe59VMM7MmEyjgJCq4/aXR1fzdEJEPiL8=
github.com/smartcontractkit/chainlink-testing-framework v1.35.0/go.mod h1:ekYJbRAxXcs/YgOjHsY9/tlvDvXzv3lxcZK2eFUZduc=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.2-0.20240805111647-acf86c1e347a h1:8GtvGJaGyKzx/ar1yX74GxrzIYWTZVTyv4pYB/1ln8w=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.2-0.20240805111647-acf86c1e347a/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU=
github.com/smartcontractkit/chainlink-testing-framework/havoc v0.1.0 h1:eHsvf2SklyyZ5fTHJIsIZ3eUnfO0TJU2BSZ7j8kLvzM=
Expand Down
4 changes: 0 additions & 4 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,6 @@ func (c *TestConfig) readNetworkConfiguration() error {

c.Network.UpperCaseNetworkNames()
c.Network.OverrideURLsAndKeysFromEVMNetwork()
err := c.Network.Default()
if err != nil {
return errors.Wrapf(err, "error reading default network config")
}

// this is the only value we need to generate dynamically before starting a new simulated chain
if c.PrivateEthereumNetwork != nil && c.PrivateEthereumNetwork.EthereumChainConfig != nil {
Expand Down
25 changes: 14 additions & 11 deletions integration-tests/testconfig/testconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ import (
)

func TestBase64ConfigRead(t *testing.T) {
networkConfigTOML := `
[RpcHttpUrls]
arbitrum_goerli = ["https://devnet-1.mt/ABC/rpc/"]
optimism_goerli = ["https://devnet-3.mt/ABC/rpc/"]
[RpcWsUrls]
arbitrum_goerli = ["wss://devnet-1.mt/ABC/rpc/"]
optimism_goerli = ["wss://devnet-2.mt/ABC/rpc/"]
`
networksEncoded := base64.StdEncoding.EncodeToString([]byte(networkConfigTOML))
os.Setenv(ctf_config.Base64NetworkConfigEnvVarName, networksEncoded)
os.Setenv("E2E_TEST_ARBITRUM_GOERLI_RPC_HTTP_URL", "https://devnet-1.mt/ABC/rpc/")
os.Setenv("E2E_TEST_ARBITRUM_GOERLI_RPC_WS_URL", "wss://devnet-1.mt/ABC/rpc/")
os.Setenv("E2E_TEST_ARBITRUM_GOERLI_WALLET_KEY", "0x3333333333333333333333333333333333333333")
defer os.Unsetenv("E2E_TEST_ARBITRUM_GOERLI_RPC_HTTP_URL")
defer os.Unsetenv("E2E_TEST_ARBITRUM_GOERLI_RPC_WS_URL")
defer os.Unsetenv("E2E_TEST_ARBITRUM_GOERLI_WALLET_KEY")
os.Setenv("E2E_TEST_OPTIMISM_GOERLI_RPC_HTTP_URL", "https://devnet-3.mt/ABC/rpc/")
os.Setenv("E2E_TEST_OPTIMISM_GOERLI_RPC_WS_URL", "wss://devnet-3.mt/ABC/rpc/")
os.Setenv("E2E_TEST_OPTIMISM_GOERLI_WALLET_KEY", "0x3333333333333333333333333333333333333333")
defer os.Unsetenv("E2E_TEST_OPTIMISM_GOERLI_RPC_HTTP_URL")
defer os.Unsetenv("E2E_TEST_OPTIMISM_GOERLI_RPC_WS_URL")
defer os.Unsetenv("E2E_TEST_OPTIMISM_GOERLI_WALLET_KEY")

testConfig := TestConfig{
Automation: &a_config.Config{
Expand All @@ -35,6 +36,8 @@ func TestBase64ConfigRead(t *testing.T) {
BlockTime: ptr.Ptr(10),
SpecType: ptr.Ptr("minimum"),
ChainlinkNodeLogLevel: ptr.Ptr("debug"),
UsePrometheus: ptr.Ptr(true),
RemoveNamespace: ptr.Ptr(true),
},
Load: []a_config.Load{
{
Expand Down

0 comments on commit 702fe12

Please sign in to comment.