From 807cd6eaf22fa9dd9e1a35ff714b2ad8d71432a2 Mon Sep 17 00:00:00 2001 From: zorzal Date: Wed, 20 Nov 2024 21:37:23 -0500 Subject: [PATCH 1/2] test: remove fuzz in integration tests --- solidity/test/integration/Finalization.t.sol | 6 ++++-- solidity/test/integration/ResponseProposal.t.sol | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/solidity/test/integration/Finalization.t.sol b/solidity/test/integration/Finalization.t.sol index 42a89ee..52a6b18 100644 --- a/solidity/test/integration/Finalization.t.sol +++ b/solidity/test/integration/Finalization.t.sol @@ -34,7 +34,8 @@ contract Integration_Finalization is IntegrationBase { /** * @notice Test to check that finalization data is set and callback calls are made. */ - function test_makeAndIgnoreLowLevelCalls(bytes memory _calldata) public { + function test_makeAndIgnoreLowLevelCalls() public { + bytes memory _calldata = bytes('calldata'); mockRequest.finalityModuleData = abi.encode(IMockFinalityModule.RequestParameters({target: _callbackTarget, data: _calldata})); @@ -115,7 +116,8 @@ contract Integration_Finalization is IntegrationBase { /** * @notice Test to check that finalizing a request without disputes triggers callback calls and executes without reverting. */ - function test_finalizeWithUndisputedResponse(bytes calldata _calldata) public { + function test_finalizeWithUndisputedResponse() public { + bytes memory _calldata = bytes('some-calldata'); mockRequest.finalityModuleData = abi.encode(IMockFinalityModule.RequestParameters({target: _callbackTarget, data: _calldata})); diff --git a/solidity/test/integration/ResponseProposal.t.sol b/solidity/test/integration/ResponseProposal.t.sol index 77f37fb..4534b3d 100644 --- a/solidity/test/integration/ResponseProposal.t.sol +++ b/solidity/test/integration/ResponseProposal.t.sol @@ -48,7 +48,8 @@ contract Integration_ResponseProposal is IntegrationBase { _requestId = oracle.createRequest(mockRequest, _ipfsHash, mockAccessControl); } - function test_proposeResponse_validResponse(bytes memory _response) public { + function test_proposeResponse_validResponse() public { + bytes memory _response = bytes('valid-response'); mockResponse.response = _response; // Revert if not approved to create request @@ -79,8 +80,9 @@ contract Integration_ResponseProposal is IntegrationBase { assertEq(_responseIds[0], _getId(mockResponse)); } - function test_proposeResponse_finalizedRequest(uint256 _timestamp) public { - _timestamp = bound(_timestamp, _expectedDeadline + _baseDisputeWindow, type(uint128).max); + function test_proposeResponse_finalizedRequest() public { + uint256 _timestamp = _expectedDeadline + _baseDisputeWindow; + // _timestamp = bound(_timestamp, _expectedDeadline + _baseDisputeWindow, type(uint128).max); // Propose response mockAccessControl.user = proposer; From 64758eacbcefece02904fe3be601565b486fe1ca Mon Sep 17 00:00:00 2001 From: zorzal Date: Mon, 9 Dec 2024 13:58:16 -0500 Subject: [PATCH 2/2] chore: remove commented line --- solidity/test/integration/ResponseProposal.t.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/solidity/test/integration/ResponseProposal.t.sol b/solidity/test/integration/ResponseProposal.t.sol index 4534b3d..573e3f6 100644 --- a/solidity/test/integration/ResponseProposal.t.sol +++ b/solidity/test/integration/ResponseProposal.t.sol @@ -82,7 +82,6 @@ contract Integration_ResponseProposal is IntegrationBase { function test_proposeResponse_finalizedRequest() public { uint256 _timestamp = _expectedDeadline + _baseDisputeWindow; - // _timestamp = bound(_timestamp, _expectedDeadline + _baseDisputeWindow, type(uint128).max); // Propose response mockAccessControl.user = proposer;