1
0

Revert "regtests: in py ctx, refer to configvars directly, not as str literals"

This reverts commit dde7fd09ac.
This commit is contained in:
ThomasV
2025-03-10 12:01:41 +01:00
parent 7030f3de18
commit 707d87a0d4

View File

@@ -2,13 +2,8 @@ import os
import sys import sys
import unittest import unittest
import subprocess import subprocess
from typing import Mapping, Any
from electrum.simple_config import SimpleConfig
class TestLightning(unittest.TestCase): class TestLightning(unittest.TestCase):
agents: Mapping[str, Mapping[str, Any]]
@staticmethod @staticmethod
def run_shell(args, timeout=30): def run_shell(args, timeout=30):
@@ -51,7 +46,7 @@ class TestLightningAB(TestLightning):
'alice': { 'alice': {
}, },
'bob': { 'bob': {
SimpleConfig.LIGHTNING_LISTEN.key(): 'localhost:9735', 'lightning_listen': 'localhost:9735',
} }
} }
@@ -83,15 +78,15 @@ class TestLightningAB(TestLightning):
class TestLightningSwapserver(TestLightning): class TestLightningSwapserver(TestLightning):
agents = { agents = {
'alice': { 'alice': {
SimpleConfig.LIGHTNING_USE_GOSSIP.key(): 'false', 'use_gossip': 'false',
SimpleConfig.SWAPSERVER_URL.key(): 'http://localhost:5455', 'swapserver_url': 'http://localhost:5455',
SimpleConfig.NOSTR_RELAYS.key(): "''", 'nostr_relays': "''",
}, },
'bob': { 'bob': {
SimpleConfig.LIGHTNING_LISTEN.key(): 'localhost:9735', 'lightning_listen': 'localhost:9735',
'enable_plugin_swapserver': 'true', 'enable_plugin_swapserver': 'true',
SimpleConfig.SWAPSERVER_PORT.key(): '5455', 'swapserver_port': '5455',
SimpleConfig.NOSTR_RELAYS.key(): "''", 'nostr_relays': "''",
} }
} }
@@ -108,17 +103,17 @@ class TestLightningSwapserver(TestLightning):
class TestLightningWatchtower(TestLightning): class TestLightningWatchtower(TestLightning):
agents = { agents = {
'alice': { 'alice':{
}, },
'bob': { 'bob':{
SimpleConfig.LIGHTNING_LISTEN.key(): 'localhost:9735', 'lightning_listen': 'localhost:9735',
SimpleConfig.WATCHTOWER_CLIENT_URL.key(): 'http://wtuser:wtpassword@127.0.0.1:12345', 'watchtower_url': 'http://wtuser:wtpassword@127.0.0.1:12345',
}, },
'carol': { 'carol':{
'enable_plugin_watchtower': 'true', 'enable_plugin_watchtower': 'true',
SimpleConfig.WATCHTOWER_SERVER_USER.key(): 'wtuser', 'watchtower_user': 'wtuser',
SimpleConfig.WATCHTOWER_SERVER_PASSWORD.key(): 'wtpassword', 'watchtower_password': 'wtpassword',
SimpleConfig.WATCHTOWER_SERVER_PORT.key(): '12345', 'watchtower_port': '12345',
} }
} }
@@ -128,15 +123,15 @@ class TestLightningWatchtower(TestLightning):
class TestLightningJIT(TestLightning): class TestLightningJIT(TestLightning):
agents = { agents = {
'alice': { 'alice':{
SimpleConfig.ACCEPT_ZEROCONF_CHANNELS.key(): 'true', 'accept_zeroconf_channels': 'true',
}, },
'bob': { 'bob':{
SimpleConfig.LIGHTNING_LISTEN.key(): 'localhost:9735', 'lightning_listen': 'localhost:9735',
SimpleConfig.EXPERIMENTAL_LN_FORWARD_PAYMENTS.key(): 'true', 'lightning_forward_payments': 'true',
SimpleConfig.ACCEPT_ZEROCONF_CHANNELS.key(): 'true', 'accept_zeroconf_channels': 'true',
}, },
'carol': { 'carol':{
} }
} }
@@ -146,17 +141,17 @@ class TestLightningJIT(TestLightning):
class TestLightningJITTrampoline(TestLightningJIT): class TestLightningJITTrampoline(TestLightningJIT):
agents = { agents = {
'alice': { 'alice':{
SimpleConfig.LIGHTNING_USE_GOSSIP.key(): 'false', 'use_gossip': 'false',
SimpleConfig.ACCEPT_ZEROCONF_CHANNELS.key(): 'true', 'accept_zeroconf_channels': 'true',
}, },
'bob': { 'bob':{
SimpleConfig.LIGHTNING_LISTEN.key(): 'localhost:9735', 'lightning_listen': 'localhost:9735',
SimpleConfig.EXPERIMENTAL_LN_FORWARD_PAYMENTS.key(): 'true', 'lightning_forward_payments': 'true',
SimpleConfig.EXPERIMENTAL_LN_FORWARD_TRAMPOLINE_PAYMENTS.key(): 'true', 'lightning_forward_trampoline_payments': 'true',
SimpleConfig.ACCEPT_ZEROCONF_CHANNELS.key(): 'true', 'accept_zeroconf_channels': 'true',
}, },
'carol': { 'carol':{
SimpleConfig.LIGHTNING_USE_GOSSIP.key(): 'false', 'use_gossip': 'false',
} }
} }