-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import pytest | ||
import tomlkit | ||
from pystarport import ports | ||
|
||
from .utils import wait_for_port | ||
|
||
|
||
def test_config_client_id(cronos): | ||
n0 = "cronos_777-1-node0" | ||
cronos.supervisorctl("stop", n0) | ||
cli = cronos.cosmos_cli(0) | ||
home = cli.data_dir | ||
file = "config/client.toml" | ||
|
||
def edit_client_cfg(chain_id): | ||
node0 = tomlkit.parse((home / file).read_text()) | ||
node0["chain-id"] = chain_id | ||
(home / file).write_text(tomlkit.dumps(node0)) | ||
|
||
edit_client_cfg("") | ||
with pytest.raises(Exception): | ||
cronos.supervisorctl("start", n0) | ||
|
||
edit_client_cfg("cronos_777-1") | ||
cronos.supervisorctl("start", n0) | ||
wait_for_port(ports.rpc_port(cronos.base_port(0))) | ||
|
||
# transfer without chain-id flag should work | ||
rsp = cli.transfer("signer1", cli.address("validator"), "1basetcro") | ||
assert rsp["code"] == 0, rsp["raw_log"] | ||
Check failure on line 30 in integration_tests/test_client_id.py GitHub Actions / integration_tests
|