mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
pytest: Fix elementsd tests
This commit is contained in:
parent
9a51418e82
commit
4121941d92
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from pyln.client import Plugin
|
||||
|
||||
@ -8,8 +9,12 @@ from pyln.client import Plugin
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
network = os.environ.get("TEST_NETWORK", "regtest")
|
||||
cli = "bitcoin-cli" if network == "regtest" else "elements-cli"
|
||||
|
||||
|
||||
def bcli(plugin, cmd):
|
||||
ret = subprocess.run(['bitcoin-cli',
|
||||
ret = subprocess.run([cli,
|
||||
'-datadir={}'.format(plugin.get_option("bitcoin-datadir")),
|
||||
'-rpcuser={}'.format(plugin.get_option("bitcoin-rpcuser")),
|
||||
'-rpcpassword={}'.format(plugin.get_option("bitcoin-rpcpassword")),
|
||||
|
Loading…
Reference in New Issue
Block a user