Skip to content

Commit

Permalink
optional pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG committed Mar 4, 2024
1 parent 352ce22 commit 7bc71d6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions integration-tests/ccip-tests/testconfig/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type CCIPTestConfig struct {
ChaosDuration *config.Duration `toml:",omitempty"`
USDCMockDeployment *bool `toml:",omitempty"`
TimeoutForPriceUpdate *config.Duration `toml:",omitempty"`
WithPipeline *bool `toml:",omitempty"`
}

func (c *CCIPTestConfig) SetTestRunName(name string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ NoOfNetworks = 2 # this is used with Networks in `CCIP.Env`,

Blockscout = false # if true, the test will use blockscout
TimeoutForPriceUpdate = '15m' # Duration to wait for the price update to time-out.
# Now testing only with dynamic price getter (no pipeline).
# Could be removed once the pipeline is completely removed.
WithPipeline = false

# uncomment the following if you want to run your tests with specific number of lanes;
# in this case out of all the possible lane combinations, only the ones with the specified number of lanes will be considered
Expand Down Expand Up @@ -241,6 +244,7 @@ RequestPerUnitTime = [1] # number of ccip requests to be sent per unit time
TimeUnit = '1s' # unit of time for RequestPerUnitTime
NoOfNetworks = 2 # same as above
Blockscout = false # same as above
WithPipeline = false
TimeoutForPriceUpdate = '15m' # time to wait for price update

# uncomment the following if you want to run your tests with specific number of lanes;
Expand Down Expand Up @@ -281,6 +285,7 @@ Blockscout = false
ChaosDuration = '10m' # Duration for whichever chaos will be injected; only valid for chaos tests
WaitBetweenChaosDuringLoad = '2m' # Duration to wait between each chaos injection during load test; only valid for chaos tests
TimeoutForPriceUpdate = '15m' # Timeout for price update
WithPipeline = false
# uncomment the following if you want to run your tests with specific number of lanes;
# in this case out of all the possible lane combinations, only the ones with the specified number of lanes will be considered
# for example, if you have provided CCIP.Env.Networks = ['SIMULATED_1', 'SIMULATED_2', 'SIMULATED_3'] and CCIP.Groups.<test_type>.MaxNoOfLanes = 2,
Expand Down
17 changes: 9 additions & 8 deletions integration-tests/ccip-tests/testsetups/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (o *CCIPTestSetUpOutputs) AddLanesForNetworkPair(
networkA, networkB blockchain.EVMNetwork,
chainClientA, chainClientB blockchain.EVMClient,
transferAmounts []*big.Int,
commitAndExecOnSameDON, bidirectional bool,
commitAndExecOnSameDON, bidirectional, withPipeline bool,
) error {
var allErrors atomic.Error
t := o.Cfg.Test
Expand Down Expand Up @@ -478,10 +478,6 @@ func (o *CCIPTestSetUpOutputs) AddLanesForNetworkPair(
return errors.WithStack(fmt.Errorf("chain contracts for network %s not found", networkB.Name))
}

// Now testing only with dynamic price getter (no pipeline).
// Could be removed once the pipeline is completely removed.
withPipeline := false

setUpFuncs.Go(func() error {
lggr.Info().Msgf("Setting up lane %s to %s", networkA.Name, networkB.Name)
srcConfig, destConfig, err := ccipLaneA2B.DeployNewCCIPLane(o.Env, commitAndExecOnSameDON, networkACmn, networkBCmn,
Expand Down Expand Up @@ -713,15 +709,19 @@ func CCIPDefaultTestSetUp(
}
require.NoError(t, chainAddGrp.Wait(), "Deploying common contracts shouldn't fail")

withPipeline := pointer.GetBool(setUpArgs.Cfg.TestGroupInput.WithPipeline)

// set up mock server for price pipeline and usdc attestation if not using existing deployment
if !pointer.GetBool(setUpArgs.Cfg.TestGroupInput.ExistingDeployment) {
var killgrave *ctftestenv.Killgrave
if setUpArgs.Env.LocalCluster != nil {
killgrave = setUpArgs.Env.LocalCluster.MockAdapter
}
// set up mock server for price pipeline. need to set it once for all the lanes as the price pipeline path uses
// regex to match the path for all tokens across all lanes
actions.SetMockserverWithTokenPriceValue(killgrave, setUpArgs.Env.MockServer)
if withPipeline {
// set up mock server for price pipeline. need to set it once for all the lanes as the price pipeline path uses
// regex to match the path for all tokens across all lanes
actions.SetMockserverWithTokenPriceValue(killgrave, setUpArgs.Env.MockServer)
}
if pointer.GetBool(setUpArgs.Cfg.TestGroupInput.USDCMockDeployment) {
// if it's a new USDC deployment, set up mock server for attestation,
// we need to set it only once for all the lanes as the attestation path uses regex to match the path for
Expand Down Expand Up @@ -752,6 +752,7 @@ func CCIPDefaultTestSetUp(
chainByChainID[n.NetworkA.ChainID], chainByChainID[n.NetworkB.ChainID], transferAmounts,
pointer.GetBool(testConfig.TestGroupInput.CommitAndExecuteOnSameDON),
pointer.GetBool(testConfig.TestGroupInput.BiDirectionalLane),
withPipeline,
)
})
}
Expand Down

0 comments on commit 7bc71d6

Please sign in to comment.