Skip to content

Commit

Permalink
pytest: stop using deprecated commando_rune commands.
Browse files Browse the repository at this point in the history
These are about to start logging warnings, so use modern versions for tests
which aren't explicitly about testing obsolete ones.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell authored and endothermicdev committed Feb 14, 2025
1 parent e81a50e commit d18f564
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,8 @@ def test_cli(node_factory):

def test_cli_commando(node_factory):
l1, l2 = node_factory.line_graph(2, fundchannel=False,
opts={'log-level': 'io', 'allow-deprecated-apis': True})
rune = l2.rpc.commando_rune()['rune']
opts={'log-level': 'io'})
rune = l2.rpc.createrune()['rune']

# Invalid peer id.
val = subprocess.run(['cli/lightning-cli',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,7 @@ def test_commando(node_factory, executor):
l1, l2 = node_factory.line_graph(2, fundchannel=False,
opts={'log-level': 'io', 'allow-deprecated-apis': True})

rune = l1.rpc.commando_rune()['rune']
rune = l1.rpc.createrune()['rune']

# Bad rune fails
with pytest.raises(RpcError, match="Not authorized: Not derived from master"):
Expand Down Expand Up @@ -3116,7 +3116,7 @@ def test_commando_stress(node_factory, executor):
'allow-deprecated-apis': True,
})

rune = nodes[0].rpc.commando_rune()['rune']
rune = nodes[0].rpc.createrune()['rune']
for n in nodes[1:]:
n.connect(nodes[0])

Expand Down
4 changes: 2 additions & 2 deletions tests/test_runes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def test_createrune(node_factory):
rune4 = l1.rpc.createrune(restrictions=[["id^022d223620a359a47ff7"], ["method=listpeers"]])
assert rune4['rune'] == 'YPojv9qgHPa3im0eiqRb-g8aRq76OasyfltGGqdFUOU9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJz'
assert rune4['unique_id'] == '3'
rune5 = l1.rpc.commando_rune(rune4['rune'], [["pnamelevel!", "pnamelevel/io"]])
rune5 = l1.rpc.createrune(rune4['rune'], [["pnamelevel!", "pnamelevel/io"]])
assert rune5['rune'] == 'Zm7A2mKkLnd5l6Er_OMAHzGKba97ij8lA-MpNYMw9nk9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJzJnBuYW1lbGV2ZWwhfHBuYW1lbGV2ZWwvaW8='
assert rune5['unique_id'] == '3'
rune6 = l1.rpc.commando_rune(rune5['rune'], [["parr1!", "parr1/io"]])
rune6 = l1.rpc.createrune(rune5['rune'], [["parr1!", "parr1/io"]])
assert rune6['rune'] == 'm_tyR0qqHUuLEbFJW6AhmBg-9npxVX2yKocQBFi9cvY9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJzJnBuYW1lbGV2ZWwhfHBuYW1lbGV2ZWwvaW8mcGFycjEhfHBhcnIxL2lv'
assert rune6['unique_id'] == '3'
rune7 = l1.rpc.createrune(restrictions=[["pnum=0"]])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ def test_hsmtool_makerune(node_factory):
l1.start()

# We have to generate a rune now, for commando to even start processing!
rune = l1.rpc.commando_rune()['rune']
rune = l1.rpc.createrune()['rune']
assert rune == out


Expand Down

0 comments on commit d18f564

Please sign in to comment.