Skip to content

Commit cb1ec06

Browse files
committed
test: include integration test
1 parent 4be72bc commit cb1ec06

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

docs/userguides/networks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@ To use a different network, such as `hardhat` or Anvil nodes, use the `--network
499499
ape networks run --network ethereum:local:foundry
500500
```
501501

502+
To configure the network process, use `--block_time`, `--base-fee-multiplier`, and `--transaction-timeout` flags.
503+
502504
## Provider Interaction
503505

504506
Once you are connected to a network, you now have access to a `.provider`.

tests/integration/cli/test_networks.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,26 @@ def test_run_custom_network(ape_cli, runner):
201201
assert expected in result.output
202202

203203

204+
@run_once
205+
def test_run_custom_args(ape_cli, runner):
206+
cmd = (
207+
"networks",
208+
"run",
209+
"--network",
210+
"ethereum:local:test",
211+
"--block-time",
212+
"10",
213+
"--base-fee-multiplier",
214+
"1.2",
215+
"--transaction-timeout",
216+
"60",
217+
)
218+
result = runner.invoke(ape_cli, cmd)
219+
expected = "`ape networks run` requires a provider that manages a process, not 'test'"
220+
assert result.exit_code != 0
221+
assert expected in result.output
222+
223+
204224
@geth_process_test
205225
@skip_projects_except("geth")
206226
def test_run_already_running(networks_runner, integ_project, geth_provider):

0 commit comments

Comments
 (0)