Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bittensor_cli/src/commands/subnets/subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ async def register(
if not await subtensor.subnet_exists(netuid=netuid, block_hash=block_hash):
err_console.print(f"[red]Subnet {netuid} does not exist[/red]")
if json_output:
json_console.print(
json_console.print_json(
data={
"success": False,
"msg": f"Subnet {netuid} does not exist",
Expand Down
11 changes: 9 additions & 2 deletions tests/e2e_tests/test_axon.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ def test_axon_reset_and_set(local_chain, wallet_setup):
"--additional-info",
"Axon test subnet",
"--no-prompt",
"--no-mev-protection",
],
)
assert result.exit_code == 0, f"Subnet creation failed: {result.stdout}"
assert f"Registered subnetwork with netuid: {netuid}" in result.stdout, (
f"Subnet creation failed: {result.stdout}|{result.stderr}"
)

# Register neuron on the subnet
result = exec_command_alice(
Expand Down Expand Up @@ -282,9 +285,12 @@ def test_axon_set_with_ipv6(local_chain, wallet_setup):
"--additional-info",
"IPv6 test subnet",
"--no-prompt",
"--no-mev-protection",
],
)
assert result.exit_code == 0, f"Subnet creation failed: {result.stdout}"
assert f"Registered subnetwork with netuid: {netuid}" in result.stdout, (
f"Subnet creation failed: {result.stdout}|{result.stderr}"
)

# Register neuron on the subnet
result = exec_command_bob(
Expand Down Expand Up @@ -413,6 +419,7 @@ def test_axon_set_invalid_inputs(local_chain, wallet_setup):
"--additional-info",
"Invalid inputs test subnet",
"--no-prompt",
"--no-mev-protection",
],
)
assert result.exit_code == 0
Expand Down