Skip to content

Commit 7eb7ba2

Browse files
committed
fix(e2e): allow skipping bridge tests
Signed-off-by: Tomás Migone <[email protected]>
1 parent e9cab36 commit 7eb7ba2

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

scripts/e2e

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ function test_e2e () {
104104
local NETWORK=$1
105105
local GRAPH_CONFIG=$2
106106
local ADDRESS_BOOK=$3
107+
local SKIP_BRIDGE_TESTS=$4
107108

108-
npx hardhat e2e --network "$NETWORK" --graph-config "$GRAPH_CONFIG" --address-book "$ADDRESS_BOOK"
109+
if [[ -z "$SKIP_BRIDGE_TESTS" ]]; then
110+
npx hardhat e2e --network "$NETWORK" --graph-config "$GRAPH_CONFIG" --address-book "$ADDRESS_BOOK"
111+
else
112+
npx hardhat e2e --network "$NETWORK" --graph-config "$GRAPH_CONFIG" --address-book "$ADDRESS_BOOK" --skip-bridge
113+
fi
109114
}
110115

111116
function test_e2e_scenarios () {
@@ -177,8 +182,10 @@ fi
177182

178183
## TEST
179184
# Run e2e tests
180-
test_e2e "$L1_NETWORK" "$L1_GRAPH_CONFIG" "$ADDRESS_BOOK"
181-
if [[ -n "$L2_NETWORK" ]]; then
185+
if [[ -z "$L2_NETWORK" ]]; then
186+
test_e2e "$L1_NETWORK" "$L1_GRAPH_CONFIG" "$ADDRESS_BOOK" true
187+
else
188+
test_e2e "$L1_NETWORK" "$L1_GRAPH_CONFIG" "$ADDRESS_BOOK"
182189
test_e2e "$L2_NETWORK" "$L2_GRAPH_CONFIG" "$ADDRESS_BOOK"
183190
fi
184191

tasks/e2e/e2e.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ const setGraphConfig = async (args: TaskArguments, hre: HardhatRuntimeEnvironmen
3030
task('e2e', 'Run all e2e tests')
3131
.addOptionalParam('graphConfig', cliOpts.graphConfig.description)
3232
.addOptionalParam('addressBook', cliOpts.addressBook.description)
33+
.addFlag('skipBridge', 'Skip bridge tests')
3334
.setAction(async (args, hre: HardhatRuntimeEnvironment) => {
34-
const testFiles = [
35+
let testFiles = [
3536
...new glob.GlobSync(CONFIG_TESTS).found,
3637
...new glob.GlobSync(INIT_TESTS).found,
3738
]
3839

40+
if (args.skipBridge) {
41+
testFiles = testFiles.filter((file) => !['l1', 'l2'].includes(file.split('/')[3]))
42+
}
43+
3944
setGraphConfig(args, hre)
4045
await hre.run(TASK_TEST, {
4146
testFiles: testFiles,

0 commit comments

Comments
 (0)