mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
pytest: Remove any existing lightning-dirs before running
This was causing some issue when automatically rerunning tests on travis. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
da062df594
commit
330682abfe
@ -8,6 +8,7 @@ import queue
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import shutil
|
||||
import socket
|
||||
import sqlite3
|
||||
import stat
|
||||
@ -107,6 +108,9 @@ class NodeFactory(object):
|
||||
lightning_dir = os.path.join(
|
||||
TEST_DIR, self.testname, "lightning-{}/".format(node_id))
|
||||
|
||||
if os.path.exists(lightning_dir):
|
||||
shutil.rmtree(lightning_dir)
|
||||
|
||||
socket_path = os.path.join(lightning_dir, "lightning-rpc").format(node_id)
|
||||
port = 16330 + node_id
|
||||
daemon = utils.LightningD(lightning_dir, self.bitcoind.bitcoin_dir, port=port, random_hsm=random_hsm)
|
||||
|
Loading…
Reference in New Issue
Block a user