mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-26 20:30:59 +01:00
pytest: skip some test when DEPRECATED_APIS is enabled.
This commit is contained in:
parent
242ddb5660
commit
5aafef1484
3 changed files with 14 additions and 6 deletions
|
@ -6,8 +6,8 @@ from flaky import flaky # noqa: F401
|
|||
from pyln.client import RpcError
|
||||
from threading import Event
|
||||
from pyln.testing.utils import (
|
||||
DEVELOPER, TIMEOUT, VALGRIND, sync_blockheight, only_one, wait_for,
|
||||
TailableProc, env
|
||||
DEVELOPER, TIMEOUT, VALGRIND, DEPRECATED_APIS, sync_blockheight, only_one,
|
||||
wait_for, TailableProc, env
|
||||
)
|
||||
from ephemeral_port_reserve import reserve
|
||||
from utils import EXPERIMENTAL_FEATURES
|
||||
|
@ -743,6 +743,7 @@ def test_address(node_factory):
|
|||
l2.rpc.connect(l1.info['id'], l1.daemon.opts['addr'])
|
||||
|
||||
|
||||
@unittest.skipIf(DEPRECATED_APIS, "Tests the --allow-deprecated-apis config")
|
||||
def test_listconfigs(node_factory, bitcoind, chainparams):
|
||||
# Make extremely long entry, check it works
|
||||
l1 = node_factory.get_node(options={'log-prefix': 'lightning1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'})
|
||||
|
@ -1352,7 +1353,10 @@ def test_ipv4_and_ipv6(node_factory):
|
|||
assert int(bind[0]['port']) == port
|
||||
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "Without DEVELOPER=1 we snap to FEERATE_FLOOR on testnets")
|
||||
@unittest.skipIf(
|
||||
not DEVELOPER or DEPRECATED_APIS, "Without DEVELOPER=1 we snap to "
|
||||
"FEERATE_FLOOR on testnets, and we test the new API."
|
||||
)
|
||||
def test_feerates(node_factory):
|
||||
l1 = node_factory.get_node(options={'log-level': 'io'}, start=False)
|
||||
l1.daemon.rpcproxy.mock_rpc('estimatesmartfee', {
|
||||
|
|
|
@ -5,7 +5,8 @@ from hashlib import sha256
|
|||
from pyln.client import RpcError, Millisatoshi
|
||||
from pyln.proto import Invoice
|
||||
from utils import (
|
||||
DEVELOPER, only_one, sync_blockheight, TIMEOUT, wait_for, TEST_NETWORK, expected_features
|
||||
DEVELOPER, only_one, sync_blockheight, TIMEOUT, wait_for, TEST_NETWORK,
|
||||
DEPRECATED_APIS, expected_features
|
||||
)
|
||||
|
||||
import json
|
||||
|
@ -46,6 +47,7 @@ def test_option_passthrough(node_factory, directory):
|
|||
n.stop()
|
||||
|
||||
|
||||
@unittest.skipIf(DEPRECATED_APIS, "We test the new API.")
|
||||
def test_option_types(node_factory):
|
||||
"""Ensure that desired types of options are
|
||||
respected in output """
|
||||
|
@ -914,7 +916,9 @@ def test_libplugin(node_factory):
|
|||
assert l1.rpc.call("testrpc") == l1.rpc.getinfo()
|
||||
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs LIGHTNINGD_DEV_LOG_IO")
|
||||
@unittest.skipIf(
|
||||
not DEVELOPER or DEPRECATED_APIS, "needs LIGHTNINGD_DEV_LOG_IO and new API"
|
||||
)
|
||||
def test_plugin_feature_announce(node_factory):
|
||||
"""Check that features registered by plugins show up in messages.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from pyln.testing.utils import TEST_NETWORK, SLOW_MACHINE, TIMEOUT, VALGRIND, DEVELOPER # noqa: F401
|
||||
from pyln.testing.utils import TEST_NETWORK, SLOW_MACHINE, TIMEOUT, VALGRIND, DEVELOPER, DEPRECATED_APIS # noqa: F401
|
||||
from pyln.testing.utils import env, only_one, wait_for, write_config, TailableProc, sync_blockheight, wait_channel_quiescent, get_tx_p2wsh_outnum # noqa: F401
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue