Skip to content

Commit

Permalink
pytest: Fix elementsd tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Sep 25, 2023
1 parent 6014b05 commit 3b405dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/plugins/badestimate.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#!/usr/bin/env python3
import json
import subprocess
import os

from pyln.client import Plugin


plugin = Plugin()


network = os.environ.get("TEST_NETWORK", "regtest")
cli = "bitcoin-cli" if network == "bitcoin" 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")),
Expand Down

0 comments on commit 3b405dc

Please sign in to comment.