From a46e2894943dcafc09a3ce9b3b39301ce6a72105 Mon Sep 17 00:00:00 2001 From: Ryan Hall Date: Thu, 1 Aug 2024 16:42:30 -0400 Subject: [PATCH] add empty list test case to applyDestChainConfigUpdates() test --- contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol index f52839abea9..81dd5f4b96d 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol @@ -764,6 +764,11 @@ contract EVM2EVMMultiOnRamp_applyDestChainConfigUpdates is EVM2EVMMultiOnRampSet s_onRamp.applyDestChainConfigUpdates(configArgs); assertEq(address(s_sourceRouter), s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).router); assertEq(address(9999), s_onRamp.getDestChainConfig(9999).router); + // handles empty list + uint256 numLogs = vm.getRecordedLogs().length; + configArgs = new EVM2EVMMultiOnRamp.DestChainConfigArgs[](0); + s_onRamp.applyDestChainConfigUpdates(configArgs); + assertEq(numLogs, vm.getRecordedLogs().length); // indicates no changes made } function test_ApplyDestChainConfigUpdates_WithInalidChainSelector_Revert() external {