mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
pytest: skip some test when DEPRECATED_APIS is enabled.
This commit is contained in:
@@ -6,8 +6,8 @@ from flaky import flaky # noqa: F401
|
|||||||
from pyln.client import RpcError
|
from pyln.client import RpcError
|
||||||
from threading import Event
|
from threading import Event
|
||||||
from pyln.testing.utils import (
|
from pyln.testing.utils import (
|
||||||
DEVELOPER, TIMEOUT, VALGRIND, sync_blockheight, only_one, wait_for,
|
DEVELOPER, TIMEOUT, VALGRIND, DEPRECATED_APIS, sync_blockheight, only_one,
|
||||||
TailableProc, env
|
wait_for, TailableProc, env
|
||||||
)
|
)
|
||||||
from ephemeral_port_reserve import reserve
|
from ephemeral_port_reserve import reserve
|
||||||
from utils import EXPERIMENTAL_FEATURES
|
from utils import EXPERIMENTAL_FEATURES
|
||||||
@@ -743,6 +743,7 @@ def test_address(node_factory):
|
|||||||
l2.rpc.connect(l1.info['id'], l1.daemon.opts['addr'])
|
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):
|
def test_listconfigs(node_factory, bitcoind, chainparams):
|
||||||
# Make extremely long entry, check it works
|
# Make extremely long entry, check it works
|
||||||
l1 = node_factory.get_node(options={'log-prefix': 'lightning1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'})
|
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
|
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):
|
def test_feerates(node_factory):
|
||||||
l1 = node_factory.get_node(options={'log-level': 'io'}, start=False)
|
l1 = node_factory.get_node(options={'log-level': 'io'}, start=False)
|
||||||
l1.daemon.rpcproxy.mock_rpc('estimatesmartfee', {
|
l1.daemon.rpcproxy.mock_rpc('estimatesmartfee', {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ from hashlib import sha256
|
|||||||
from pyln.client import RpcError, Millisatoshi
|
from pyln.client import RpcError, Millisatoshi
|
||||||
from pyln.proto import Invoice
|
from pyln.proto import Invoice
|
||||||
from utils import (
|
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
|
import json
|
||||||
@@ -46,6 +47,7 @@ def test_option_passthrough(node_factory, directory):
|
|||||||
n.stop()
|
n.stop()
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(DEPRECATED_APIS, "We test the new API.")
|
||||||
def test_option_types(node_factory):
|
def test_option_types(node_factory):
|
||||||
"""Ensure that desired types of options are
|
"""Ensure that desired types of options are
|
||||||
respected in output """
|
respected in output """
|
||||||
@@ -914,7 +916,9 @@ def test_libplugin(node_factory):
|
|||||||
assert l1.rpc.call("testrpc") == l1.rpc.getinfo()
|
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):
|
def test_plugin_feature_announce(node_factory):
|
||||||
"""Check that features registered by plugins show up in messages.
|
"""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
|
from pyln.testing.utils import env, only_one, wait_for, write_config, TailableProc, sync_blockheight, wait_channel_quiescent, get_tx_p2wsh_outnum # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user