mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
elements: Skip DB migration tests if we're not running in regtest
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
67fc8ffbcf
commit
90a69e04cd
@@ -15,6 +15,7 @@ with open('config.vars') as configfile:
|
|||||||
config = dict([(line.rstrip().split('=', 1)) for line in configfile])
|
config = dict([(line.rstrip().split('=', 1)) for line in configfile])
|
||||||
|
|
||||||
VALGRIND = os.getenv("VALGRIND", config['VALGRIND']) == "1"
|
VALGRIND = os.getenv("VALGRIND", config['VALGRIND']) == "1"
|
||||||
|
TEST_NETWORK = os.getenv("TEST_NETWORK", config['TEST_NETWORK'])
|
||||||
DEVELOPER = os.getenv("DEVELOPER", config['DEVELOPER']) == "1"
|
DEVELOPER = os.getenv("DEVELOPER", config['DEVELOPER']) == "1"
|
||||||
TEST_DEBUG = os.getenv("TEST_DEBUG", "0") == "1"
|
TEST_DEBUG = os.getenv("TEST_DEBUG", "0") == "1"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
from fixtures import * # noqa: F401,F403
|
from fixtures import * # noqa: F401,F403
|
||||||
from utils import wait_for, sync_blockheight, COMPAT
|
from utils import wait_for, sync_blockheight, COMPAT
|
||||||
|
from fixtures import TEST_NETWORK
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(TEST_NETWORK != 'regtest', "The DB migration is network specific due to the chain var.")
|
||||||
def test_db_dangling_peer_fix(node_factory):
|
def test_db_dangling_peer_fix(node_factory):
|
||||||
# This was taken from test_fail_unconfirmed() node.
|
# This was taken from test_fail_unconfirmed() node.
|
||||||
l1 = node_factory.get_node(dbfile='dangling-peer.sqlite3.xz')
|
l1 = node_factory.get_node(dbfile='dangling-peer.sqlite3.xz')
|
||||||
|
|||||||
Reference in New Issue
Block a user