Skip to content

Commit 33c7565

Browse files
authored
Refactor the test file structure
* Test Folder restructured * Rename folder mistake * adapt rest of references * Delete TestFolderRefactoring.md * adapt remappings * Moving contracts into correct positions * Move contract * Moving more contracts * Moving contract * Fixing References
1 parent f8f9854 commit 33c7565

File tree

118 files changed

+276
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+276
-292
lines changed

remappings.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
@lm_pc/=src/modules/logicModule/paymentClient/
1010
@aut/=src/modules/authorizer/
1111
@modLib/=src/modules/lib/
12+
@mocks/=test/mocks/
13+
@testUtilities/=test/testUtilities/
14+
@unitTest/=test/unit/

script/deploymentScript/TestnetDeploymentScript.s.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import {IERC20} from "@oz/token/ERC20/IERC20.sol";
1616
import {
1717
OptimisticOracleV3Mock,
1818
OptimisticOracleV3Interface
19-
} from "test/modules/logicModule/oracle/utils/OptimisiticOracleV3Mock.sol";
20-
import {ERC20Mock} from "test/utils/mocks/ERC20Mock.sol";
19+
} from "@mocks/modules/logicModule/oracle/OptimisiticOracleV3Mock.sol";
20+
import {ERC20Mock} from "@mocks/external/token/ERC20Mock.sol";
2121

2222
/**
2323
* @title Inverter Testnet Deployment Script

src/templates/tests/unit/FM_Template_v1.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
ModuleTest,
77
IModule_v1,
88
IOrchestrator_v1
9-
} from "test/modules/ModuleTest.sol";
10-
import {OZErrors} from "test/utils/errors/OZErrors.sol";
9+
} from "@unitTest/modules/ModuleTest.sol";
10+
import {OZErrors} from "@testUtilities/OZErrors.sol";
1111
import {IFundingManager_v1} from "@fm/IFundingManager_v1.sol";
1212

1313
// External
@@ -16,11 +16,11 @@ import {Clones} from "@oz/proxy/Clones.sol";
1616
// Tests and Mocks
1717
import {FM_Template_v1_Exposed} from
1818
"src/templates/tests/unit/FM_Template_v1_Exposed.sol";
19-
import {ERC20Mock} from "test/utils/mocks/ERC20Mock.sol";
19+
import {ERC20Mock} from "@mocks/external/token/ERC20Mock.sol";
2020
import {
2121
IERC20PaymentClientBase_v2,
2222
ERC20PaymentClientBaseV2Mock
23-
} from "test/utils/mocks/modules/paymentClient/ERC20PaymentClientBaseV2Mock.sol";
23+
} from "@mocks/modules/paymentClient/ERC20PaymentClientBaseV2Mock.sol";
2424

2525
// System under Test (SuT)
2626
import {IFM_Template_v1} from "src/templates/modules/IFM_Template_v1.sol";

src/templates/tests/unit/LM_PC_Template_v1.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
ModuleTest,
77
IModule_v1,
88
IOrchestrator_v1
9-
} from "test/modules/ModuleTest.sol";
10-
import {OZErrors} from "test/utils/errors/OZErrors.sol";
11-
import {ERC20Mock} from "test/utils/mocks/ERC20Mock.sol";
9+
} from "@unitTest/modules/ModuleTest.sol";
10+
import {OZErrors} from "@testUtilities/OZErrors.sol";
11+
import {ERC20Mock} from "@mocks/external/token/ERC20Mock.sol";
1212

1313
// External
1414
import {Clones} from "@oz/proxy/Clones.sol";
@@ -17,7 +17,7 @@ import {Clones} from "@oz/proxy/Clones.sol";
1717
import {
1818
IERC20PaymentClientBase_v2,
1919
ERC20PaymentClientBaseV2Mock
20-
} from "test/utils/mocks/modules/paymentClient/ERC20PaymentClientBaseV2Mock.sol";
20+
} from "@mocks/modules/paymentClient/ERC20PaymentClientBaseV2Mock.sol";
2121

2222
// System under Test (SuT)
2323
import {LM_PC_Template_v1_Exposed} from

src/templates/tests/unit/PP_Template_v1.t.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
ModuleTest,
77
IModule_v1,
88
IOrchestrator_v1
9-
} from "test/modules/ModuleTest.sol";
10-
import {OZErrors} from "test/utils/errors/OZErrors.sol";
9+
} from "@unitTest/modules/ModuleTest.sol";
10+
import {OZErrors} from "@testUtilities/OZErrors.sol";
1111

1212
// External
1313
import {Clones} from "@oz/proxy/Clones.sol";
@@ -19,7 +19,7 @@ import {
1919
IERC20PaymentClientBase_v2,
2020
ERC20PaymentClientBaseV2Mock,
2121
ERC20Mock
22-
} from "test/utils/mocks/modules/paymentClient/ERC20PaymentClientBaseV2Mock.sol";
22+
} from "@mocks/modules/paymentClient/ERC20PaymentClientBaseV2Mock.sol";
2323

2424
// System under Test (SuT)
2525
import {

test/e2e/E2ETest.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {IFM_BC_Bancor_Redeeming_VirtualSupply_v1} from
4444
import {BancorFormula} from "@fm/bondingCurve/formulas/BancorFormula.sol";
4545

4646
// Mocks
47-
import {ERC20Mock} from "test/utils/mocks/ERC20Mock.sol";
47+
import {ERC20Mock} from "@mocks/external/token/ERC20Mock.sol";
4848

4949
// External Dependencies
5050
import {TransparentUpgradeableProxy} from

test/e2e/fundingManager/BondingCurveFundingManagerE2E.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
FM_BC_Bancor_Redeeming_VirtualSupply_v1,
1818
IFM_BC_Bancor_Redeeming_VirtualSupply_v1
1919
} from
20-
"test/modules/fundingManager/bondingCurve/FM_BC_Bancor_Redeeming_VirtualSupply_v1.t.sol";
20+
"@unitTest/modules/fundingManager/bondingCurve/FM_BC_Bancor_Redeeming_VirtualSupply_v1.t.sol";
2121
import {IBondingCurveBase_v1} from
2222
"@fm/bondingCurve/interfaces/IBondingCurveBase_v1.sol";
2323

test/e2e/fundingManager/BondingCurveTokenRescueE2E.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
FM_BC_Bancor_Redeeming_VirtualSupply_v1,
1919
IFM_BC_Bancor_Redeeming_VirtualSupply_v1
2020
} from
21-
"test/modules/fundingManager/bondingCurve/FM_BC_Bancor_Redeeming_VirtualSupply_v1.t.sol";
21+
"@unitTest/modules/fundingManager/bondingCurve/FM_BC_Bancor_Redeeming_VirtualSupply_v1.t.sol";
2222
import {IBondingCurveBase_v1} from
2323
"@fm/bondingCurve/interfaces/IBondingCurveBase_v1.sol";
2424

test/e2e/OracleFundingManagerAndManualQueueBasedPaymentProcessorE2E.sol renamed to test/e2e/fundingManager/oracle/OracleFundingManagerAndManualQueueBasedPaymentProcessorE2E.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {ERC165Upgradeable} from
3737

3838
import {InverterBeacon_v1} from "src/proxies/InverterBeacon_v1.sol";
3939

40-
import {ERC20Mock} from "test/utils/mocks/ERC20Mock.sol";
40+
import {ERC20Mock} from "@mocks/external/token/ERC20Mock.sol";
4141

4242
import {IERC20PaymentClientBase_v2} from
4343
"@lm/interfaces/IERC20PaymentClientBase_v2.sol";
File renamed without changes.

0 commit comments

Comments
 (0)