@@ -3,7 +3,6 @@ package smoke_test
33import (
44 "flag"
55 "fmt"
6- "maps"
76 "os"
87 "testing"
98
@@ -12,7 +11,6 @@ import (
1211
1312 "github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
1413 "github.com/smartcontractkit/chainlink/integration-tests/actions"
15- "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
1614
1715 "github.com/smartcontractkit/chainlink-starknet/integration-tests/common"
1816 tc "github.com/smartcontractkit/chainlink-starknet/integration-tests/testconfig"
@@ -30,65 +28,44 @@ func init() {
3028}
3129
3230func TestOCRBasic (t * testing.T ) {
33- for _ , test := range []struct {
34- name string
35- env map [string ]string
36- }{
37- {name : "embedded" },
38- {name : "plugins" , env : map [string ]string {
39- "CL_MEDIAN_CMD" : "chainlink-feeds" ,
40- "CL_SOLANA_CMD" : "chainlink-solana" ,
41- }},
42- } {
43- config , err := tc .GetConfig ("Smoke" , tc .OCR2 )
44- if err != nil {
45- t .Fatal (err )
46- }
47- err = os .Setenv ("CHAINLINK_ENV_USER" , * config .Common .User )
48- require .NoError (t , err , "Could not set CHAINLINK_ENV_USER" )
49- err = os .Setenv ("INTERNAL_DOCKER_REPO" , * config .Common .InternalDockerRepo )
50- require .NoError (t , err , "Could not set INTERNAL_DOCKER_REPO" )
51- t .Run (test .name , func (t * testing.T ) {
52- t .Parallel ()
53- logging .Init ()
54- //
55- state , err := common .NewOCRv2State (t , "smoke-ocr2" , & config )
56- require .NoError (t , err , "Could not setup the ocrv2 state" )
31+ config , err := tc .GetConfig ("Smoke" , tc .OCR2 )
32+ if err != nil {
33+ t .Fatal (err )
34+ }
35+ err = os .Setenv ("CHAINLINK_ENV_USER" , * config .Common .User )
36+ require .NoError (t , err , "Could not set CHAINLINK_ENV_USER" )
37+ err = os .Setenv ("INTERNAL_DOCKER_REPO" , * config .Common .InternalDockerRepo )
38+ require .NoError (t , err , "Could not set INTERNAL_DOCKER_REPO" )
5739
58- // K8s specific config and cleanup
59- if * config .Common .InsideK8s {
60- t .Cleanup (func () {
61- if err = actions .TeardownSuite (t , nil , state .Common .Env , state .ChainlinkNodesK8s , nil , zapcore .PanicLevel , nil ); err != nil {
62- state .TestConfig .L .Error ().Err (err ).Msg ("Error tearing down environment" )
63- }
64- })
65- }
66- if len (test .env ) > 0 {
67- state .Common .TestEnvDetails .NodeOpts = append (state .Common .TestEnvDetails .NodeOpts , func (n * test_env.ClNode ) {
68- if n .ContainerEnvs == nil {
69- n .ContainerEnvs = map [string ]string {}
70- }
71- maps .Copy (n .ContainerEnvs , test .env )
72- })
40+ logging .Init ()
41+ //
42+ state , err := common .NewOCRv2State (t , "smoke-ocr2" , & config )
43+ require .NoError (t , err , "Could not setup the ocrv2 state" )
44+
45+ // K8s specific config and cleanup
46+ if * config .Common .InsideK8s {
47+ t .Cleanup (func () {
48+ if err = actions .TeardownSuite (t , nil , state .Common .Env , state .ChainlinkNodesK8s , nil , zapcore .PanicLevel , nil ); err != nil {
49+ state .TestConfig .L .Error ().Err (err ).Msg ("Error tearing down environment" )
7350 }
74- state .DeployCluster ()
75- // Setting up G++ Client
76- rpcURL := state .Common .RPCDetails .RPCL2Internal
77- gppURL := state .TestConfig .TestConfig .Common .GauntletPlusPlusURL
78- state .Clients .GauntletPPClient , err = gauntlet .NewStarknetGauntletPlusPlus (gppURL , rpcURL , state .Account .Account , state .Account .PrivateKey )
79- require .NoError (t , err , "Setting up gauntlet++ should not fail" )
51+ })
52+ }
53+ state .DeployCluster ()
54+ // Setting up G++ Client
55+ rpcURL := state .Common .RPCDetails .RPCL2Internal
56+ gppURL := state .TestConfig .TestConfig .Common .GauntletPlusPlusURL
57+ state .Clients .GauntletPPClient , err = gauntlet .NewStarknetGauntletPlusPlus (gppURL , rpcURL , state .Account .Account , state .Account .PrivateKey )
58+ require .NoError (t , err , "Setting up gauntlet++ should not fail" )
8059
81- state .Clients .GauntletClient , err = gauntlet .NewStarknetGauntlet (fmt .Sprintf ("%s/" , utils .ProjectRoot ))
82- require .NoError (t , err , "Setting up gauntlet should not fail" )
83- err = state .Clients .GauntletClient .SetupNetwork (state .Common .RPCDetails .RPCL2External , state .Account .Account , state .Account .PrivateKey )
84- require .NoError (t , err , "Setting up gauntlet network should not fail" )
85- err = state .DeployGauntletPP (0 , 100000000000 , decimals , "auto" , 1 , 1 )
86- require .NoError (t , err , "Deploying contracts should not fail" )
60+ state .Clients .GauntletClient , err = gauntlet .NewStarknetGauntlet (fmt .Sprintf ("%s/" , utils .ProjectRoot ))
61+ require .NoError (t , err , "Setting up gauntlet should not fail" )
62+ err = state .Clients .GauntletClient .SetupNetwork (state .Common .RPCDetails .RPCL2External , state .Account .Account , state .Account .PrivateKey )
63+ require .NoError (t , err , "Setting up gauntlet network should not fail" )
64+ err = state .DeployGauntletPP (0 , 100000000000 , decimals , "auto" , 1 , 1 )
65+ require .NoError (t , err , "Deploying contracts should not fail" )
8766
88- state .SetUpNodes ()
67+ state .SetUpNodes ()
8968
90- err = state .ValidateRounds (* config .OCR2 .NumberOfRounds , false )
91- require .NoError (t , err , "Validating round should not fail" )
92- })
93- }
69+ err = state .ValidateRounds (* config .OCR2 .NumberOfRounds , false )
70+ require .NoError (t , err , "Validating round should not fail" )
9471}
0 commit comments