Skip to content

Commit

Permalink
TOML migration (#572)
Browse files Browse the repository at this point in the history
* TOML migration

* Fixing dep

* Go bump

* Chicken or egg

* set image in config toml (#573)

* disable shellcheck on copied script

* bump core + integration-tests deps

* fix compilation errors

* fix: update soak config naming

---------

Co-authored-by: Aaron Lu <[email protected]>
  • Loading branch information
smickovskid and aalu1418 authored Feb 7, 2024
1 parent 111b7c0 commit 414a666
Show file tree
Hide file tree
Showing 12 changed files with 321 additions and 25 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ jobs:
with:
name: artifacts
path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
- name: Generate config overrides
run: | # https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md
cat << EOF > config.toml
[ChainlinkImage]
image="${{ env.CL_ECR }}"
version="solana.${{ github.event.inputs.cl_branch_ref || github.sha }}"
EOF
# shellcheck disable=SC2002
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
# shellcheck disable=SC2086
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
# shellcheck disable=SC2086
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ integration-tests/smoke/contracts-chaos-state.json
tmp-manifest-*
tests-smoke-report.xml
.env.test*
overrides.toml

# Test & linter reports
*report.xml
Expand Down
Empty file added integration-tests/.root_dir
Empty file.
6 changes: 5 additions & 1 deletion integration-tests/common/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/smartcontractkit/chainlink-solana/integration-tests/solclient"
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/utils/osutil"
"github.com/smartcontractkit/chainlink/integration-tests/testconfig"

"golang.org/x/sync/errgroup"

Expand Down Expand Up @@ -115,7 +116,7 @@ type ProposalAcceptConfig struct {
RandomSecret string `json:"randomSecret"`
}

func NewOCRv2State(t *testing.T, contracts int, namespacePrefix string, env string, isK8s bool) (*OCRv2TestState, error) {
func NewOCRv2State(t *testing.T, contracts int, namespacePrefix string, env string, isK8s bool, testConfig *testconfig.TestConfig) (*OCRv2TestState, error) {

c, err := New(env, isK8s).Default(t, namespacePrefix)
if err != nil {
Expand All @@ -129,6 +130,7 @@ func NewOCRv2State(t *testing.T, contracts int, namespacePrefix string, env stri
Client: &solclient.Client{},
T: t,
L: log.Logger,
TestConfig: testConfig,
}
if state.T != nil {
state.L = logging.GetTestLogger(state.T)
Expand Down Expand Up @@ -161,6 +163,7 @@ type OCRv2TestState struct {
T *testing.T
Common *Common
L zerolog.Logger
TestConfig *testconfig.TestConfig
}

type ContractsState struct {
Expand Down Expand Up @@ -194,6 +197,7 @@ func (m *OCRv2TestState) DeployCluster(contractsDir string) {
b, err := test_env.NewCLTestEnvBuilder().
WithNonEVM().
WithTestInstance(m.T).
WithTestConfig(m.TestConfig).
WithMockAdapter().
WithCLNodeConfig(m.Common.DefaultNodeConfig()).
WithCLNodes(m.Common.NodeCount).
Expand Down
17 changes: 10 additions & 7 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ require (
github.com/onsi/gomega v1.30.0
github.com/rs/zerolog v1.30.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240119150605-bbac0e5e53a5
github.com/smartcontractkit/chainlink-testing-framework v1.22.6
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240119194447-119386a71ed2
github.com/smartcontractkit/chainlink/v2 v2.8.0-beta0.0.20240119194447-119386a71ed2
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240207111946-9485e5909eda
github.com/smartcontractkit/chainlink-testing-framework v1.23.2
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240207165744-230ff8ccd821
github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240207165744-230ff8ccd821
github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1
github.com/stretchr/testify v1.8.4
github.com/testcontainers/testcontainers-go v0.23.0
Expand Down Expand Up @@ -65,6 +65,7 @@ require (
github.com/aws/aws-sdk-go v1.45.25 // indirect
github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect
github.com/aws/jsii-runtime-go v1.75.0 // indirect
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
Expand Down Expand Up @@ -220,8 +221,10 @@ require (
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/consul/api v1.25.1 // indirect
github.com/hashicorp/consul/sdk v0.14.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-envparse v0.1.0 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack v0.5.5 // indirect
Expand Down Expand Up @@ -346,14 +349,14 @@ require (
github.com/slack-go/slack v0.12.2 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240206150430-fbccaa95af62 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240119022220-6c8b864f07b0 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240206145519-35a4346b5944 // indirect
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/wasp v0.4.0 // indirect
github.com/smartcontractkit/wasp v0.4.1 // indirect
github.com/smartcontractkit/wsrpc v0.7.2 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
Expand Down
32 changes: 18 additions & 14 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ github.com/aws/constructs-go/constructs/v10 v10.1.255 h1:5hARfEmhBqHSTQf/C3QLA3s
github.com/aws/constructs-go/constructs/v10 v10.1.255/go.mod h1:DCdBSjN04Ck2pajCacTD4RKFqSA7Utya8d62XreYctI=
github.com/aws/jsii-runtime-go v1.75.0 h1:NhpUfyiL7/wsRuUekFsz8FFBCYLfPD/l61kKg9kL/a4=
github.com/aws/jsii-runtime-go v1.75.0/go.mod h1:TKCyrtM0pygEPo4rDZzbMSDNCDNTSYSN6/mGyHI6O3I=
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0=
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
Expand Down Expand Up @@ -841,6 +843,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdmPSDFPY=
github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc=
github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY=
github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
Expand Down Expand Up @@ -1391,22 +1395,22 @@ github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce h1:+6MzHiHMPBddiR9tnkXA7pjgd2mNaboPck8cNsSfYrs=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240205180946-df826cb540ce/go.mod h1:05rRF84QKlIOF5LfTBPkHdw4UpBI2G3zxRcuZ65bPjk=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71 h1:Ju0cxdrzGFwHGDPp16IzkOyX87LZ/kKDFG1A+VSEJHY=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231222201016-da3f0a763f71/go.mod h1:Ppv5X8MTUkkpKdb270dLefjio724vMkCWmSSaWo7CzI=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240206150430-fbccaa95af62 h1:DuSQLuq+Ilm3Q+2zn5agLrAi9UvFQmOUdKwZQKX0AFA=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240206150430-fbccaa95af62/go.mod h1:Ny6kBD8Houh5yZRmGiB0ovsLHdb4qOHHwBno9JZUT+Y=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 h1:xYqRgZO0nMSO8CBCMR0r3WA+LZ4kNL8a6bnbyk/oBtQ=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1/go.mod h1:GuPvyXryvbiUZIHmPeLBz4L+yJKeyGUjrDfd1KNne+o=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240119022220-6c8b864f07b0 h1:+j/D+gqM9eAXBqaBai/gu9UqdNV45RPQfVApezaL+0M=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240119022220-6c8b864f07b0/go.mod h1:rVkZPci7tgDLGHgPV2ird0F16uoGajh0uLfs7dkyvdo=
github.com/smartcontractkit/chainlink-testing-framework v1.22.6 h1:5kWMlo99RY/ys4EWGMPsEg1sfY67f5YQogI8PohdRvw=
github.com/smartcontractkit/chainlink-testing-framework v1.22.6/go.mod h1:FBRC6elqaqO8jiMZMfa3UKrvwzZhMGUtYqVTGYmfFrA=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240206145519-35a4346b5944 h1:1Cb/XqEs38SFpkBHHxdhYqS8RZR7qXGaXH9+lxtMGJo=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240206145519-35a4346b5944/go.mod h1:pGnBsaraD3vPjnak8jbu9U+OWZrCVHzGMjA/5++E1PI=
github.com/smartcontractkit/chainlink-testing-framework v1.23.2 h1:haXPd9Pg++Zs5/QIZnhFd9RElmz/d0+4nNeletUg9ZM=
github.com/smartcontractkit/chainlink-testing-framework v1.23.2/go.mod h1:StIOdxvwd8AMO6xuBtmD6FQfJXktEn/mJJEr7728BTc=
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240119194447-119386a71ed2 h1:JgJzhWooOGT+PrPyFK6OK1IgkY7/bMuuOG7hAoVwONI=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240119194447-119386a71ed2/go.mod h1:XK71UoFQ3d8Zu3YKi4Z+OIPzOb3i/bROQsBEP8x56vk=
github.com/smartcontractkit/chainlink/v2 v2.8.0-beta0.0.20240119194447-119386a71ed2 h1:CFt9tBmZ0kEDbxCfJkqyq3SBP/0FP3X3Fhk0pNjtUFM=
github.com/smartcontractkit/chainlink/v2 v2.8.0-beta0.0.20240119194447-119386a71ed2/go.mod h1:JaSgxYWXEUSIDBJgjqVzuXYG9FPz7eJZIKCuq9sfp3E=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240207165744-230ff8ccd821 h1:TAVolauV5Y7qZfhrvY2bKSMSHbXKRHmuoyTWoQxt/tU=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240207165744-230ff8ccd821/go.mod h1:40/94yfTYqFMyKnElZc2Uaq8ZYZSlBFf5FpWT1mbYeI=
github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240207165744-230ff8ccd821 h1:jCRla05GlwQ1xzghAz5ufORI3jOKP+iMGGh/L6CXrms=
github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240207165744-230ff8ccd821/go.mod h1:bJmsdGnX7bnC/8hVfQExHcpvPZraypYVr2SgUJU0PZ8=
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 All @@ -1417,8 +1421,8 @@ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg=
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ=
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
github.com/smartcontractkit/wasp v0.4.0 h1:N8yPxlBvoJiyE6HaDkTkwRbuOHkGgQFGEHbw36oh4jA=
github.com/smartcontractkit/wasp v0.4.0/go.mod h1:3qiofyI3pkbrc48a3CVshbMfgl74SiuPL/tm30d9Wb4=
github.com/smartcontractkit/wasp v0.4.1 h1:qgIx2s+eCwH0OaBKaHEAHUQ1Z47bAgDu+ICS9IOqvGQ=
github.com/smartcontractkit/wasp v0.4.1/go.mod h1:3qiofyI3pkbrc48a3CVshbMfgl74SiuPL/tm30d9Wb4=
github.com/smartcontractkit/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ=
github.com/smartcontractkit/wsrpc v0.7.2/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
Expand Down Expand Up @@ -2066,8 +2070,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc=
google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs=
google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY=
google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down
14 changes: 12 additions & 2 deletions integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
"go.uber.org/zap/zapcore"
"gopkg.in/guregu/null.v4"

tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig"

"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext"
"github.com/smartcontractkit/chainlink/integration-tests/actions"
Expand All @@ -41,12 +43,16 @@ func TestSolanaOCRV2Smoke(t *testing.T) {
"CL_SOLANA_CMD": "chainlink-solana",
}},
} {
config, err := tc.GetConfig("Smoke", tc.OCR2)
if err != nil {
t.Fatal(err)
}
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

logging.Init()
state, err := common.NewOCRv2State(t, 1, "smoke-"+test.name, "localnet", false)
state, err := common.NewOCRv2State(t, 1, "smoke-"+test.name, "localnet", false, &config)
require.NoError(t, err, "Could not setup the ocrv2 state")
if len(test.env) > 0 {
state.Common.NodeOpts = append(state.Common.NodeOpts, func(n *test_env.ClNode) {
Expand All @@ -64,9 +70,13 @@ func TestSolanaOCRV2Smoke(t *testing.T) {
}

func TestSolanaGauntletOCRV2Smoke(t *testing.T) {
config, err := tc.GetConfig("Smoke", tc.OCR2)
if err != nil {
t.Fatal(err)
}
l := logging.GetTestLogger(t)
secret := "this is an testing only secret"
state, err := common.NewOCRv2State(t, 1, "gauntlet", "devnet", true)
state, err := common.NewOCRv2State(t, 1, "gauntlet", "devnet", true, &config)
require.NoError(t, err, "Could not setup the ocrv2 state")
if state.Common.Env.WillUseRemoteRunner() {
// run the remote runner and exit
Expand Down
8 changes: 7 additions & 1 deletion integration-tests/soak/ocr2_soak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ import (

"github.com/stretchr/testify/require"

tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig"

"github.com/smartcontractkit/chainlink-solana/integration-tests/common"
"github.com/smartcontractkit/chainlink-solana/integration-tests/utils"
)

func TestSolanaOCRV2SoakTest(t *testing.T) {
state, err := common.NewOCRv2State(t, 5, "soak", "devnet", true)
config, err := tc.GetConfig("Soak", tc.OCR2)
if err != nil {
t.Fatal(err)
}
state, err := common.NewOCRv2State(t, 5, "soak", "devnet", true, &config)
require.NoError(t, err, "Could not setup the ocrv2 state")
if state.Common.Env.WillUseRemoteRunner() {
// run the remote runner and exit
Expand Down
22 changes: 22 additions & 0 deletions integration-tests/testconfig/default.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Logging]
test_log_collect=false

[Logging.LogStream]
log_targets=["file"]
log_producer_timeout="10s"
log_producer_retry_limit=10

[Network]
selected_networks=["simulated"]

[PrivateEthereumNetwork]
consensus_type="pow"
execution_layer="geth"

[PrivateEthereumNetwork.EthereumChainConfig]
seconds_per_slot=3
slots_per_epoch=2
genesis_delay=15
validator_count=4
chain_id=1337
addresses_to_fund=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]
96 changes: 96 additions & 0 deletions integration-tests/testconfig/ocr2/example.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Example of full config with all fields
# General part
[ChainlinkImage]
image="public.ecr.aws/chainlink/chainlink"
version="2.7.0"

[Logging]
# if set to true will save logs even if test did not fail
test_log_collect=false

[Logging.LogStream]
# supported targets: file, loki, in-memory. if empty no logs will be persistet
log_targets=["file"]
# context timeout for starting log producer and also time-frame for requesting logs
log_producer_timeout="10s"
# number of retries before log producer gives up and stops listening to logs
log_producer_retry_limit=10

[Logging.Loki]
tenant_id="tenant_id"
# full URL of Loki ingest endpoint
endpoint="https://loki.url/api/v3/push"
# currently only needed when using public instance
basic_auth="loki-basic-auth"
# only needed for cloud grafana
bearer_token="bearer_token"

# LogStream will try to shorten Grafana URLs by default (if all 3 variables are set)
[Logging.Grafana]
# grafana url (trailing "/" will be stripped)
base_url="http://grafana.url"
# url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard
dashboard_url="/d/your-dashboard"
bearer_token="my-awesome-token"

# if you want to use polygon_mumbial
[Network]
selected_networks=["polygon_mumbai"]

[Network.RpcHttpUrls]
polygon_mumbai = ["https://my-rpc-endpoint.io"]

[Network.RpcWsUrls]
polygon_mumbai = ["https://my-rpc-endpoint.io"]

[Network.WalletKeys]
polygon_mumbai = ["change-me-to-your-PK"]

[PrivateEthereumNetwork]
# pos or pow
consensus_type="pos"
# only prysm supported currently
consensus_layer="prysm"
# geth, besu, nethermind or erigon
execution_layer="geth"
# if true after env started it will wait for at least 1 epoch to be finalised before continuing
wait_for_finalization=false

[PrivateEthereumNetwork.EthereumChainConfig]
# duration of single slot, lower => faster block production, must be >= 4
seconds_per_slot=12
# numer of slots in epoch, lower => faster epoch finalisation, must be >= 4
slots_per_epoch=6
# extra genesis gelay, no need to modify, but it should be after all validators/beacon chain starts
genesis_delay=15
# number of validators in the network
validator_count=8
chain_id=1337
# list of addresses to be prefunded in genesis
addresses_to_fund=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]

# load test specific configuration
[Load.OCR]
[Load.OCR.Common]
eth_funds = 3

[Load.OCR.Load]
test_duration = "3m"
rate_limit_unit_duration = "1m"
rate = 3
verification_interval = "5s"
verification_timeout = "3m"
ea_change_interval = "5s"

# soak test specific configuration
[Soak.Common]
chainlink_node_funding = 100

[Soak.OCR]
[Soak.OCR.Common]
test_duration="15m"

[Soak.OCR.Soak]
ocr_version="1"
number_of_contracts=2
time_between_rounds="1m"
Loading

0 comments on commit 414a666

Please sign in to comment.