mirror of
https://github.com/lens-protocol/core.git
synced 2026-04-22 03:02:03 -04:00
Merge pull request #63 from lens-protocol/test/exclude-tests-from-coverage
test: exclude tests from coverage
This commit is contained in:
@@ -415,6 +415,10 @@ contract ChangeDelegatedExecutorsConfigTest_GivenConfig is ChangeDelegatedExecut
|
||||
contract ChangeDelegatedExecutorsConfigTest_MetaTx is ChangeDelegatedExecutorsConfigTest_GivenConfig, MetaTxNegatives {
|
||||
mapping(address => uint256) cachedNonceByAddress;
|
||||
|
||||
function testChangeDelegatedExecutorsConfigTest_MetaTx() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function setUp() public override(ChangeDelegatedExecutorsConfigTest_CurrentConfig, MetaTxNegatives) {
|
||||
ChangeDelegatedExecutorsConfigTest_CurrentConfig.setUp();
|
||||
MetaTxNegatives.setUp();
|
||||
|
||||
@@ -14,6 +14,10 @@ contract ERC721Recipient is IERC721Receiver {
|
||||
uint256 public id;
|
||||
bytes public data;
|
||||
|
||||
function testERC721Recipient() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function onERC721Received(
|
||||
address _operator,
|
||||
address _from,
|
||||
@@ -30,12 +34,20 @@ contract ERC721Recipient is IERC721Receiver {
|
||||
}
|
||||
|
||||
contract RevertingERC721Recipient is IERC721Receiver {
|
||||
function testRevertingERC721Recipient() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function onERC721Received(address, address, uint256, bytes calldata) public virtual override returns (bytes4) {
|
||||
revert(string(abi.encodePacked(IERC721Receiver.onERC721Received.selector)));
|
||||
}
|
||||
}
|
||||
|
||||
contract WrongReturnDataERC721Recipient is IERC721Receiver {
|
||||
function testWrongReturnDataERC721Recipient() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function onERC721Received(address, address, uint256, bytes calldata) public virtual override returns (bytes4) {
|
||||
return 0xCAFEBEEF;
|
||||
}
|
||||
|
||||
@@ -403,6 +403,10 @@ contract FollowTest is BaseTest {
|
||||
contract FollowMetaTxTest is FollowTest, MetaTxNegatives {
|
||||
mapping(address => uint256) cachedNonceByAddress;
|
||||
|
||||
function testFollowMetaTxTest() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function setUp() public override(FollowTest, MetaTxNegatives) {
|
||||
FollowTest.setUp();
|
||||
MetaTxNegatives.setUp();
|
||||
|
||||
@@ -58,6 +58,10 @@ contract ProfileMetadataURITest is BaseTest {
|
||||
contract ProfileMetadataURITest_MetaTx is ProfileMetadataURITest, MetaTxNegatives {
|
||||
mapping(address => uint256) cachedNonceByAddress;
|
||||
|
||||
function testProfileMetadataURITest_MetaTx() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function setUp() public override(MetaTxNegatives, TestSetup) {
|
||||
TestSetup.setUp();
|
||||
MetaTxNegatives.setUp();
|
||||
|
||||
@@ -5,6 +5,10 @@ import 'test/foundry/base/BaseTest.t.sol';
|
||||
import 'test/foundry/ERC721Test.t.sol';
|
||||
|
||||
contract ProfileNFTTest is BaseTest, ERC721Test {
|
||||
function testProfileNFTTest() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function _mintERC721(address to) internal virtual override returns (uint256) {
|
||||
return _createProfile(to);
|
||||
}
|
||||
|
||||
@@ -184,6 +184,10 @@ abstract contract PublishingTest is BaseTest, PublishingHelpers, SigSetup {
|
||||
}
|
||||
|
||||
contract PostTest is PublishingTest {
|
||||
function testPostTest() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function _publish() internal virtual override returns (uint256) {
|
||||
return _post(mockPostParams);
|
||||
}
|
||||
|
||||
@@ -243,6 +243,10 @@ contract SetBlockStatusTest is BaseTest {
|
||||
contract SetBlockStatusMetaTxTest is SetBlockStatusTest, MetaTxNegatives {
|
||||
mapping(address => uint256) cachedNonceByAddress;
|
||||
|
||||
function testSetBlockStatusMetaTxTest() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function setUp() public override(SetBlockStatusTest, MetaTxNegatives) {
|
||||
SetBlockStatusTest.setUp();
|
||||
MetaTxNegatives.setUp();
|
||||
|
||||
@@ -193,6 +193,10 @@ contract UnfollowTest is BaseTest {
|
||||
contract UnfollowMetaTxTest is UnfollowTest, MetaTxNegatives {
|
||||
mapping(address => uint256) cachedNonceByAddress;
|
||||
|
||||
function testUnfollowMetaTxTest() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function setUp() public override(UnfollowTest, MetaTxNegatives) {
|
||||
UnfollowTest.setUp();
|
||||
MetaTxNegatives.setUp();
|
||||
|
||||
@@ -6,6 +6,10 @@ import 'contracts/libraries/constants/Types.sol';
|
||||
import {Typehash} from 'contracts/libraries/constants/Typehash.sol';
|
||||
|
||||
contract BaseTest is TestSetup {
|
||||
function testBaseTest() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function _getSetProfileMetadataURITypedDataHash(
|
||||
uint256 profileId,
|
||||
string memory metadataURI,
|
||||
|
||||
@@ -27,6 +27,10 @@ import 'test/foundry/Constants.sol';
|
||||
contract TestSetup is Test, ForkManagement, ArrayHelpers {
|
||||
using stdJson for string;
|
||||
|
||||
function testTestSetup() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
uint256 newProfileId; // TODO: We should get rid of this everywhere, and create dedicated profiles instead (see Follow tests)
|
||||
|
||||
address deployer;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
contract ArrayHelpers {
|
||||
function testArrayHelpers() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function _emptyUint256Array() internal pure returns (uint256[] memory) {
|
||||
uint256[] memory ret = new uint256[](0);
|
||||
return ret;
|
||||
|
||||
@@ -6,6 +6,10 @@ import 'forge-std/Test.sol';
|
||||
import 'contracts/libraries/constants/Types.sol';
|
||||
|
||||
contract CollectingHelpers is TestSetup {
|
||||
function testCollectingHelpers() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
string constant COLLECT_NFT_NAME_INFIX = '-Collect-';
|
||||
string constant COLLECT_NFT_SYMBOL_INFIX = '-Cl-';
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@ import 'forge-std/Script.sol';
|
||||
contract ForkManagement is Script {
|
||||
using stdJson for string;
|
||||
|
||||
function testForkManagement() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
string forkEnv;
|
||||
bool fork;
|
||||
string network;
|
||||
|
||||
@@ -5,6 +5,10 @@ import 'forge-std/Test.sol';
|
||||
import 'contracts/libraries/constants/Types.sol';
|
||||
|
||||
contract PublishingHelpers is Test {
|
||||
function testPublishingHelpers() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function _verifyPublication(Types.Publication memory pub, Types.Publication memory expectedPub) internal {
|
||||
assertEq(pub.pointedProfileId, expectedPub.pointedProfileId, 'Unexpected pointedProfileId');
|
||||
assertEq(pub.pointedPubId, expectedPub.pointedPubId, 'Unexpected pointedPubId');
|
||||
|
||||
@@ -4,6 +4,10 @@ pragma solidity ^0.8.13;
|
||||
import 'contracts/libraries/constants/Types.sol';
|
||||
|
||||
contract SigSetup {
|
||||
function testSigSetup() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
uint256 nonce;
|
||||
uint256 deadline;
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
contract MockActionModule is IPublicationActionModule {
|
||||
error MockActionModuleReverted();
|
||||
|
||||
function testMockActionModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function initializePublicationAction(
|
||||
uint256 /** profileId*/,
|
||||
uint256 /** pubId*/,
|
||||
|
||||
@@ -14,6 +14,10 @@ import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
* This module works by allowing all collects.
|
||||
*/
|
||||
contract MockCollectModule is ICollectModule {
|
||||
function testMockCollectModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev There is nothing needed at initialization.
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,10 @@ import {ILegacyCollectModule} from 'contracts/interfaces/ILegacyCollectModule.so
|
||||
* This module works by allowing all collects.
|
||||
*/
|
||||
contract MockDeprecatedCollectModule is ILegacyCollectModule {
|
||||
function testMockDeprecatedCollectModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev There is nothing needed at initialization.
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,10 @@ import {ILegacyFollowModule} from 'test/mocks/ILegacyFollowModule.sol';
|
||||
* @dev This is a simple mock follow module to be used for testing.
|
||||
*/
|
||||
contract MockDeprecatedFollowModule is ILegacyFollowModule {
|
||||
function testMockDeprecatedFollowModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function initializeFollowModule(uint256, bytes calldata data) external pure override returns (bytes memory) {
|
||||
uint256 number = abi.decode(data, (uint256));
|
||||
require(number == 1, 'MockFollowModule: invalid');
|
||||
|
||||
@@ -8,6 +8,10 @@ import {ILegacyReferenceModule} from 'contracts/interfaces/ILegacyReferenceModul
|
||||
* @dev This is a simple mock follow module to be used for testing.
|
||||
*/
|
||||
contract MockDeprecatedReferenceModule is ILegacyReferenceModule {
|
||||
function testMockDeprecatedReferenceModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function initializeReferenceModule(
|
||||
uint256,
|
||||
uint256,
|
||||
|
||||
@@ -8,6 +8,10 @@ import {IFollowModule} from 'contracts/interfaces/IFollowModule.sol';
|
||||
* @dev This is a simple mock follow module to be used for testing.
|
||||
*/
|
||||
contract MockFollowModule is IFollowModule {
|
||||
function testMockFollowModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function initializeFollowModule(
|
||||
uint256 /* profileId */,
|
||||
address /* transactionExecutor */,
|
||||
|
||||
@@ -10,6 +10,10 @@ import {IFollowModule} from 'contracts/interfaces/IFollowModule.sol';
|
||||
contract MockFollowModuleWithRevertFlag is IFollowModule {
|
||||
error MockFollowModuleReverted();
|
||||
|
||||
function testMockFollowModuleWithRevertFlag() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function initializeFollowModule(
|
||||
uint256 /* profileId */,
|
||||
address /* transactionExecutor */,
|
||||
|
||||
@@ -9,6 +9,10 @@ import {Types} from 'contracts/libraries/constants/Types.sol';
|
||||
* @dev This is a simple mock follow module to be used for testing.
|
||||
*/
|
||||
contract MockReferenceModule is IReferenceModule {
|
||||
function testMockReferenceModule() public {
|
||||
// Prevents being counted in Foundry Coverage
|
||||
}
|
||||
|
||||
function initializeReferenceModule(
|
||||
uint256,
|
||||
uint256,
|
||||
|
||||
Reference in New Issue
Block a user