mirror of
https://github.com/basicswap/basicswap.git
synced 2025-03-12 09:38:03 +00:00
tests: Add BSX_TEST_MODE env var to prepare script to manage all daemons by default.
Some checks are pending
lint / build (3.12) (push) Waiting to run
Some checks are pending
lint / build (3.12) (push) Waiting to run
This commit is contained in:
parent
60a3956c07
commit
771ad2586a
2 changed files with 4 additions and 1 deletions
|
@ -140,6 +140,7 @@ if not len(logger.handlers):
|
|||
logger.addHandler(logging.StreamHandler(sys.stdout))
|
||||
|
||||
BSX_DOCKER_MODE = toBool(os.getenv('BSX_DOCKER_MODE', 'false'))
|
||||
BSX_TEST_MODE = toBool(os.getenv('BSX_TEST_MODE', 'false'))
|
||||
UI_HTML_PORT = int(os.getenv('UI_HTML_PORT', 12700))
|
||||
UI_WS_PORT = int(os.getenv('UI_WS_PORT', 11700))
|
||||
COINS_RPCBIND_IP = os.getenv('COINS_RPCBIND_IP', '127.0.0.1')
|
||||
|
@ -276,7 +277,8 @@ def shouldManageDaemon(prefix: str) -> bool:
|
|||
The COIN _MANAGE_DAEMON variables can override this and set manage_daemon directly.
|
||||
If BSX_DOCKER_MODE is active COIN _MANAGE_DAEMON will default to false.
|
||||
'''
|
||||
manage_daemon: str = os.getenv(prefix + '_MANAGE_DAEMON', 'false' if BSX_DOCKER_MODE else 'auto')
|
||||
default_mode: str = 'false' if BSX_DOCKER_MODE else 'true' if BSX_TEST_MODE else 'auto'
|
||||
manage_daemon: str = os.getenv(prefix + '_MANAGE_DAEMON', default_mode)
|
||||
|
||||
if manage_daemon == 'auto':
|
||||
host_was_set: bool = prefix + '_RPC_HOST' in os.environ
|
||||
|
|
|
@ -92,6 +92,7 @@ def recursive_update_dict(base, new_vals):
|
|||
def run_prepare(node_id, datadir_path, bins_path, with_coins, mnemonic_in=None, num_nodes=3, use_rpcauth=False, extra_settings={}, port_ofs=0):
|
||||
config_path = os.path.join(datadir_path, cfg.CONFIG_FILENAME)
|
||||
|
||||
os.environ['BSX_TEST_MODE'] = 'true'
|
||||
os.environ['PART_RPC_PORT'] = str(PARTICL_RPC_PORT_BASE)
|
||||
os.environ['BTC_RPC_PORT'] = str(BITCOIN_RPC_PORT_BASE)
|
||||
os.environ['LTC_RPC_PORT'] = str(LITECOIN_RPC_PORT_BASE)
|
||||
|
|
Loading…
Reference in a new issue