Skip to content

Commit fb40819

Browse files
committed
fix: minor tweaks to e2e
Signed-off-by: Tomás Migone <[email protected]>
1 parent 5daa3c1 commit fb40819

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

TESTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ There are several types of e2e tests which can be run separately:
3838
It can be useful to run E2E tests against a fresh protocol deployment on L1, this can be done with the following:
3939

4040
```bash
41-
yarn test:e2e
41+
L1_NETWORK=localhost yarn test:e2e
4242
```
4343

4444
The command will:
@@ -72,13 +72,13 @@ To run tests against a live testnet or even mainnet run:
7272

7373
```bash
7474
# All e2e tests
75-
npx hardhat e2e --network <network> --graph-config config/graph.<network>.yml
75+
ARBITRUM_ADDRESS_BOOK=<arbitrum-address-book> npx hardhat e2e --network <network> --l1-graph-config config/graph.<l1-network>.yml --l2-graph-config config/graph.<l2-network>.yml
7676

7777
# Only deployment config tests
78-
npx hardhat e2e:config --network <network> --graph-config config/graph.<network>.yml
78+
ARBITRUM_ADDRESS_BOOK=<arbitrum-address-book> npx hardhat e2e:config --network <network> --l1-graph-config config/graph.<l1-network>.yml --l2-graph-config config/graph.<l2-network>.yml
7979

8080
# Only deployment init tests
81-
npx hardhat e2e:init --network <network> --graph-config config/graph.<network>.yml
81+
ARBITRUM_ADDRESS_BOOK=<arbitrum-address-book> npx hardhat e2e:init --network <network> --l1-graph-config config/graph.<l1-network>.yml --l2-graph-config config/graph.<l2-network>.yml
8282

8383
# Only a specific scenario
8484
npx hardhat e2e:scenario <scenario> --network <network> --graph-config config/graph.<network>.yml

tasks/e2e/e2e.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const setGraphConfig = async (args: TaskArguments, hre: HardhatRuntimeEnvironmen
3434
}
3535

3636
task('e2e', 'Run all e2e tests')
37-
.addFlag('disableSecureAccounts', 'Disable secure accounts on GRE')
3837
.addOptionalParam('graphConfig', cliOpts.graphConfig.description)
3938
.addOptionalParam('l1GraphConfig', cliOpts.graphConfig.description)
4039
.addOptionalParam('l2GraphConfig', cliOpts.graphConfig.description)
@@ -50,34 +49,43 @@ task('e2e', 'Run all e2e tests')
5049
testFiles = testFiles.filter((file) => !['l1', 'l2'].includes(file.split('/')[3]))
5150
}
5251

52+
// Disable secure accounts, we don't need them for this task
53+
hre.config.graph.disableSecureAccounts = true
54+
5355
setGraphConfig(args, hre)
5456
await hre.run(TASK_TEST, {
5557
testFiles: testFiles,
5658
})
5759
})
5860

5961
task('e2e:config', 'Run deployment configuration e2e tests')
60-
.addFlag('disableSecureAccounts', 'Disable secure accounts on GRE')
6162
.addOptionalParam('graphConfig', cliOpts.graphConfig.description)
6263
.addOptionalParam('l1GraphConfig', cliOpts.graphConfig.description)
6364
.addOptionalParam('l2GraphConfig', cliOpts.graphConfig.description)
6465
.addOptionalParam('addressBook', cliOpts.addressBook.description)
6566
.setAction(async (args, hre: HardhatRuntimeEnvironment) => {
6667
const files = new glob.GlobSync(CONFIG_TESTS).found
68+
69+
// Disable secure accounts, we don't need them for this task
70+
hre.config.graph.disableSecureAccounts = true
71+
6772
setGraphConfig(args, hre)
6873
await hre.run(TASK_TEST, {
6974
testFiles: files,
7075
})
7176
})
7277

7378
task('e2e:init', 'Run deployment initialization e2e tests')
74-
.addFlag('disableSecureAccounts', 'Disable secure accounts on GRE')
7579
.addOptionalParam('graphConfig', cliOpts.graphConfig.description)
7680
.addOptionalParam('l1GraphConfig', cliOpts.graphConfig.description)
7781
.addOptionalParam('l2GraphConfig', cliOpts.graphConfig.description)
7882
.addOptionalParam('addressBook', cliOpts.addressBook.description)
7983
.setAction(async (args, hre: HardhatRuntimeEnvironment) => {
8084
const files = new glob.GlobSync(INIT_TESTS).found
85+
86+
// Disable secure accounts, we don't need them for this task
87+
hre.config.graph.disableSecureAccounts = true
88+
8189
setGraphConfig(args, hre)
8290
await hre.run(TASK_TEST, {
8391
testFiles: files,

0 commit comments

Comments
 (0)