mirror of
https://github.com/lightningd/plugins.git
synced 2026-08-17 13:07:22 +02:00
rebalance: adds a very basic rebalanceall test
This commit is contained in:
parent
239a21ab6b
commit
f55df28bcd
1 changed files with 10 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import os
|
|||
from pyln.testing.fixtures import * # noqa: F401,F403
|
||||
|
||||
plugin_path = os.path.join(os.path.dirname(__file__), "rebalance.py")
|
||||
plugin_opt = {'plugin': plugin_path}
|
||||
|
||||
|
||||
def test_rebalance_starts(node_factory):
|
||||
|
|
@ -14,3 +15,12 @@ def test_rebalance_starts(node_factory):
|
|||
# Then statically
|
||||
l1.daemon.opts["plugin"] = plugin_path
|
||||
l1.start()
|
||||
|
||||
|
||||
def test_rebalance_all(node_factory):
|
||||
l1, l2 = node_factory.line_graph(2, opts=plugin_opt)
|
||||
|
||||
# for now just check we get an error if theres just one channel and we
|
||||
# could not perform an auto rebalance
|
||||
result = l1.rpc.rebalanceall()
|
||||
assert result['message'] == 'Error: Not enough open channels to balance anything'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue