diff --git a/cadence/tests/flow_evm_bridge_handler_tests.cdc b/cadence/tests/flow_evm_bridge_handler_tests.cdc index 628d8f10..780230a6 100644 --- a/cadence/tests/flow_evm_bridge_handler_tests.cdc +++ b/cadence/tests/flow_evm_bridge_handler_tests.cdc @@ -234,6 +234,9 @@ fun setup() { bridgeAccount ) Test.expect(updateBaseFeeResult, Test.beSucceeded()) + + // Unpause Bridge + updateBridgePauseStatus(signer: bridgeAccount, pause: false) } /* --- ASSET & ACCOUNT SETUP - Configure test accounts with assets to bridge --- */ diff --git a/cadence/tests/flow_evm_bridge_tests.cdc b/cadence/tests/flow_evm_bridge_tests.cdc index ea1bf5bc..0a7748e2 100644 --- a/cadence/tests/flow_evm_bridge_tests.cdc +++ b/cadence/tests/flow_evm_bridge_tests.cdc @@ -327,6 +327,11 @@ fun setup() { /* --- CONFIG TEST --- */ +access(all) +fun testUnpauseBridgeSucceeds() { + updateBridgePauseStatus(signer: bridgeAccount, pause: false) +} + access(all) fun testSetGasLimitSucceeds() { @@ -984,12 +989,8 @@ fun testBatchOnboardByEVMAddressSucceeds() { access(all) fun testPauseBridgeSucceeds() { // Pause the bridge - let pauseResult = executeTransaction( - "../transactions/bridge/admin/pause/update_bridge_pause_status.cdc", - [true], - bridgeAccount - ) - Test.expect(pauseResult, Test.beSucceeded()) + updateBridgePauseStatus(signer: bridgeAccount, pause: true) + var isPausedResult = executeScript( "../scripts/bridge/is_paused.cdc", [] @@ -1012,12 +1013,7 @@ fun testPauseBridgeSucceeds() { ) // Unpause bridging - let unpauseResult = executeTransaction( - "../transactions/bridge/admin/pause/update_bridge_pause_status.cdc", - [false], - bridgeAccount - ) - Test.expect(unpauseResult, Test.beSucceeded()) + updateBridgePauseStatus(signer: bridgeAccount, pause: false) isPausedResult = executeScript( "../scripts/bridge/is_paused.cdc", diff --git a/cadence/tests/test_helpers.cdc b/cadence/tests/test_helpers.cdc index e2c3fded..cd586013 100644 --- a/cadence/tests/test_helpers.cdc +++ b/cadence/tests/test_helpers.cdc @@ -353,6 +353,16 @@ fun evmAddressRequiresOnboarding(_ addressHex: String): Bool? { /* --- Transaction Helpers --- */ +access(all) +fun updateBridgePauseStatus(signer: Test.TestAccount, pause: Bool) { + let pauseResult = _executeTransaction( + "../transactions/bridge/admin/pause/update_bridge_pause_status.cdc", + [pause], + signer + ) + Test.expect(pauseResult, Test.beSucceeded()) +} + access(all) fun transferFlow(signer: Test.TestAccount, recipient: Address, amount: UFix64) { let transferResult = _executeTransaction(