mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-24 08:34:18 +01:00
autopilot: improve test_main that is disabled for CI
The old skipIf annotation doesn't seem to work correctly: ``` PytestUnknownMarkWarning: Unknown pytest.mark.skipIf - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html @pytest.mark.skipIf(True, "Test autopilot is hanging on DNS request") ```
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import os
|
||||
from pyln.testing.fixtures import * # noqa: F401,F403
|
||||
import pytest
|
||||
import unittest
|
||||
|
||||
CI = os.environ.get('CI') in ('True', 'true')
|
||||
|
||||
plugin_path = os.path.join(os.path.dirname(__file__), "autopilot.py")
|
||||
plugin_opt = {'plugin': plugin_path}
|
||||
@@ -17,8 +19,10 @@ def test_starts(node_factory):
|
||||
l1.daemon.opts["plugin"] = plugin_path
|
||||
l1.start()
|
||||
|
||||
@pytest.mark.skipIf(True, "Test autopilot is hanging on DNS request")
|
||||
|
||||
@unittest.skipIf(CI, "Test autopilot is hanging on DNS request")
|
||||
def test_main(node_factory):
|
||||
l1, l2 = node_factory.line_graph(2, wait_for_announce=True, opts=plugin_opt)
|
||||
# just call main function
|
||||
#assert l1.rpc.autopilot_run_once()
|
||||
l1.rpc.autopilot_run_once(dryrun=True)
|
||||
l1.daemon.wait_for_log("I'd like to open [0-9]* new channels with [0-9]* satoshis each")
|
||||
|
||||
Reference in New Issue
Block a user