-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ccip-4333 Handle all test setups with unified interface for memory an…
…d docker tests (#15581) * updates * use common ones * update test * go mod * fix rmn test * fix test * fix again * fix test * more fix * comment override * review comments * fix * updates
- Loading branch information
Showing
29 changed files
with
681 additions
and
666 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package changeset | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
|
||
chainselectors "github.com/smartcontractkit/chain-selectors" | ||
"github.com/smartcontractkit/chainlink-ccip/pluginconfig" | ||
"github.com/smartcontractkit/chainlink-common/pkg/config" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestOverrideCCIPParams(t *testing.T) { | ||
params := DefaultOCRParams(chainselectors.ETHEREUM_TESTNET_SEPOLIA.Selector, nil, nil) | ||
overrides := CCIPOCRParams{ | ||
ExecuteOffChainConfig: pluginconfig.ExecuteOffchainConfig{ | ||
RelativeBoostPerWaitHour: 10, | ||
}, | ||
CommitOffChainConfig: pluginconfig.CommitOffchainConfig{ | ||
TokenPriceBatchWriteFrequency: *config.MustNewDuration(1_000_000 * time.Hour), | ||
RemoteGasPriceBatchWriteFrequency: *config.MustNewDuration(1_000_000 * time.Hour), | ||
}, | ||
} | ||
newParams, err := params.Override(overrides) | ||
require.NoError(t, err) | ||
require.Equal(t, overrides.ExecuteOffChainConfig.RelativeBoostPerWaitHour, newParams.ExecuteOffChainConfig.RelativeBoostPerWaitHour) | ||
require.Equal(t, overrides.CommitOffChainConfig.TokenPriceBatchWriteFrequency, newParams.CommitOffChainConfig.TokenPriceBatchWriteFrequency) | ||
require.Equal(t, overrides.CommitOffChainConfig.RemoteGasPriceBatchWriteFrequency, newParams.CommitOffChainConfig.RemoteGasPriceBatchWriteFrequency) | ||
require.Equal(t, params.OCRParameters, newParams.OCRParameters) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.